Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brekk committed Jan 7, 2024
1 parent 99fbdf6 commit f2fa49f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/docs/dr-generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -1495,15 +1495,15 @@
"comments": [
{
"start": 89,
"end": 161,
"end": 162,
"summary": "Summarize a project, given:\n - the path to a `package.json` file\n - the path to a `dr-generated.json` file\n - the URI of a documentation site\n - the URI of a repository\n - (optional) a banner\n - or (optional) the path to a file which represents a banner",
"links": [],
"fileGroup": "",
"addTo": "",
"structure": {
"name": "summarize",
"future": true,
"example": "```js test=true\nimport path from 'node:path'\nimport { fork } from 'fluture'\n// drgen-import-above\nfork(done)(x => {\n expect(x.split('\\n')).toEqual([\n \"this is a cool test!\",\n \"## apps\",\n \"\",\n \" * [docs](//repo.biz/apps/docs) - documentation site for monoculture\",\n \"\",\n \"## packages\",\n \"\",\n \" * [bloodline](//repo.biz/packages/bloodline) - determine the relationships between files 🩸\",\n \" * [climate](//repo.biz/packages/climate) - CLI utilities, friend 👯\",\n \" * [climate-json](//repo.biz/packages/climate-json) - JSON parser for climate 🐐\",\n \" * [climate-toml](//repo.biz/packages/climate-toml) - TOML parser for climate 🍅\",\n \" * [climate-yaml](//repo.biz/packages/climate-yaml) - YAML parser for climate 🍠\",\n \" * [clox](//repo.biz/packages/clox) - boxes for the terminal ⏰\",\n \" * [doctor-general](//repo.biz/packages/doctor-general) - documentation generation 🩻\",\n \" * [doctor-general-jest](//repo.biz/packages/doctor-general-jest) - documentation generation - jest 🃏\",\n \" * [doctor-general-mdx](//repo.biz/packages/doctor-general-mdx) - documentation generation - mdx 🩺\",\n \" * [file-system](//repo.biz/packages/file-system) - fs, but in the future 🔮\",\n \" * [inherent](//repo.biz/packages/inherent) - functional utilities for primitives ⛺️\",\n \" * [kiddo](//repo.biz/packages/kiddo) - child processes in the future 👶\",\n \" * [knot](//repo.biz/packages/knot) - functional utilities for strings 🪢\",\n \" * [monocle](//repo.biz/packages/monocle) - inspect code and apply rules, magically 🧐\",\n \" * [monorail](//repo.biz/packages/monorail) - plugins for smug grins 🚂\",\n \" * [robot-tourist](//repo.biz/packages/robot-tourist) - human-centric source code interpreter 🤖\",\n \" * [water-wheel](//repo.biz/packages/water-wheel) - future-wrapping for streaming interfaces 🌊\",\n \"\",\n \"## shared\",\n \"\",\n \" * [eslint-config-monoculture](//repo.biz/shared/eslint-config-monoculture) - shared eslint configuration for monoculture packages 🧹\",\n \" * [jest-config](//repo.biz/shared/jest-config) - shared jest configuration for monoculture packages 🎪\",\n \" * [monoculture-tsconfig](//repo.biz/shared/monoculture-tsconfig) - shared tsconfig for monoculture packages 😵\",\n \"\",\n \"## tools\",\n \"\",\n \" * [digested](//repo.biz/tools/digested) - summarize and automatically generate information about your projects 🍽️\",\n \" * [doctor-general-cli](//repo.biz/tools/doctor-general-cli) - documentation generation in a nice CLI 🫡\",\n \" * [gitparty](//repo.biz/tools/gitparty) - visualize git logs with magical context 🎨\",\n \" * [spacework](//repo.biz/tools/spacework) - meta tools for monoculture ☄️\",\n \" * [superorganism](//repo.biz/tools/superorganism) - script runner from beyond the moon 🐁\",\n \" * [treacle](//repo.biz/tools/treacle) - command line interface tree visualization pun 🫠\",\n \"\",\n ])\n done()\n})(summarize({\n readme: true,\n dirPath: process.cwd(),\n banner: 'this is a cool test!',\n // repoUrl: 'https://github.com/brekk/monoculture/tree/main',\n // docUrl: 'https://brekk.github.io/monoculture',\n // base package only!\n repoUrl: '//repo.biz',\n docUrl: '//repo.doc',\n pkgPath: '../../package.json',\n drGenPath: '../../apps/docs/dr-generated.json'\n}))\n```"
"example": "```js test=true\nimport path from 'node:path'\nimport { fork } from 'fluture'\n// drgen-import-above\nfork(done)(x => {\n expect(x.split('\\n')).toEqual([\n \"this is a cool test!\",\n \"## apps\",\n \"\",\n \" * [docs](//repo.biz/apps/docs) - documentation site for monoculture\",\n \"\",\n \"## packages\",\n \"\",\n \" * [bloodline](//repo.biz/packages/bloodline) - determine the relationships between files 🩸\",\n \" * [climate](//repo.biz/packages/climate) - CLI utilities, friend 👯\",\n \" * [climate-json](//repo.biz/packages/climate-json) - JSON parser for climate 🐐\",\n \" * [climate-toml](//repo.biz/packages/climate-toml) - TOML parser for climate 🍅\",\n \" * [climate-yaml](//repo.biz/packages/climate-yaml) - YAML parser for climate 🍠\",\n \" * [clox](//repo.biz/packages/clox) - boxes for the terminal ⏰\",\n \" * [doctor-general](//repo.biz/packages/doctor-general) - documentation generation 🩻\",\n \" * [doctor-general-jest](//repo.biz/packages/doctor-general-jest) - documentation generation - jest 🃏\",\n \" * [doctor-general-mdx](//repo.biz/packages/doctor-general-mdx) - documentation generation - mdx 🩺\",\n \" * [file-system](//repo.biz/packages/file-system) - fs, but in the future 🔮\",\n \" * [inherent](//repo.biz/packages/inherent) - functional utilities for primitives ⛺️\",\n \" * [kiddo](//repo.biz/packages/kiddo) - child processes in the future 👶\",\n \" * [knot](//repo.biz/packages/knot) - functional utilities for strings 🪢\",\n \" * [manacle](//repo.biz/packages/manacle) - make conventions into rules, magically 🔒\",\n \" * [monocle](//repo.biz/packages/monocle) - inspect code and apply rules, magically 🧐\",\n \" * [monorail](//repo.biz/packages/monorail) - plugins for smug grins 🚂\",\n \" * [robot-tourist](//repo.biz/packages/robot-tourist) - human-centric source code interpreter 🤖\",\n \" * [water-wheel](//repo.biz/packages/water-wheel) - future-wrapping for streaming interfaces 🌊\",\n \"\",\n \"## shared\",\n \"\",\n \" * [eslint-config-monoculture](//repo.biz/shared/eslint-config-monoculture) - shared eslint configuration for monoculture packages 🧹\",\n \" * [jest-config](//repo.biz/shared/jest-config) - shared jest configuration for monoculture packages 🎪\",\n \" * [monoculture-tsconfig](//repo.biz/shared/monoculture-tsconfig) - shared tsconfig for monoculture packages 😵\",\n \"\",\n \"## tools\",\n \"\",\n \" * [digested](//repo.biz/tools/digested) - summarize and automatically generate information about your projects 🍽️\",\n \" * [doctor-general-cli](//repo.biz/tools/doctor-general-cli) - documentation generation in a nice CLI 🫡\",\n \" * [gitparty](//repo.biz/tools/gitparty) - visualize git logs with magical context 🎨\",\n \" * [spacework](//repo.biz/tools/spacework) - meta tools for monoculture ☄️\",\n \" * [superorganism](//repo.biz/tools/superorganism) - script runner from beyond the moon 🐁\",\n \" * [treacle](//repo.biz/tools/treacle) - command line interface tree visualization pun 🫠\",\n \"\",\n ])\n done()\n})(summarize({\n readme: true,\n dirPath: process.cwd(),\n banner: 'this is a cool test!',\n // repoUrl: 'https://github.com/brekk/monoculture/tree/main',\n // docUrl: 'https://brekk.github.io/monoculture',\n // base package only!\n repoUrl: '//repo.biz',\n docUrl: '//repo.doc',\n pkgPath: '../../package.json',\n drGenPath: '../../apps/docs/dr-generated.json'\n}))\n```"
},
"keywords": [
"@example",
Expand Down
1 change: 1 addition & 0 deletions apps/docs/pages/digested/summary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fork(done)(x => {
" * [inherent](//repo.biz/packages/inherent) - functional utilities for primitives ⛺️",
" * [kiddo](//repo.biz/packages/kiddo) - child processes in the future 👶",
" * [knot](//repo.biz/packages/knot) - functional utilities for strings 🪢",
" * [manacle](//repo.biz/packages/manacle) - make conventions into rules, magically 🔒",
" * [monocle](//repo.biz/packages/monocle) - inspect code and apply rules, magically 🧐",
" * [monorail](//repo.biz/packages/monorail) - plugins for smug grins 🚂",
" * [robot-tourist](//repo.biz/packages/robot-tourist) - human-centric source code interpreter 🤖",
Expand Down
2 changes: 1 addition & 1 deletion packages/climate/autotests/builder.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This test automatically generated by doctor-general.
// Sourced from 'builder.js', edits to this file may be erased.
import { configurate, defaultNameTemplate } from '../builder'
import { defaultNameTemplate, configurate } from '../builder'

import { fork } from 'fluture'
import stripAnsi from 'strip-ansi'
Expand Down
11 changes: 11 additions & 0 deletions packages/doctor-general/autotests/text.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This test automatically generated by doctor-general.
// Sourced from 'text.js', edits to this file may be erased.
import { trimComment } from '../text'

test('trimComment', () => {
expect(trimComment(' * zipzop')).toEqual('zipzop')
expect(trimComment(' * squiggle ')).toEqual('squiggle')
const input = ' ~~kljlkjlk2j32lkj3 ' + Math.round(Math.random() * 1000)
expect(trimComment(input)).toEqual(input)
expect(trimComment(29292)).toEqual(29292)
})
2 changes: 1 addition & 1 deletion packages/inherent/autotests/primitives.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This test automatically generated by doctor-general.
// Sourced from 'primitives.js', edits to this file may be erased.
import { equalishBy, coerce } from '../primitives'
import { coerce, equalishBy } from '../primitives'

test('equalishBy', () => {
const productIdSelector = z => {
Expand Down
1 change: 1 addition & 0 deletions tools/digested/autotests/summary.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test('summarize', done => {
' * [inherent](//repo.biz/packages/inherent) - functional utilities for primitives ⛺️',
' * [kiddo](//repo.biz/packages/kiddo) - child processes in the future 👶',
' * [knot](//repo.biz/packages/knot) - functional utilities for strings 🪢',
' * [manacle](//repo.biz/packages/manacle) - make conventions into rules, magically 🔒',
' * [monocle](//repo.biz/packages/monocle) - inspect code and apply rules, magically 🧐',
' * [monorail](//repo.biz/packages/monorail) - plugins for smug grins 🚂',
' * [robot-tourist](//repo.biz/packages/robot-tourist) - human-centric source code interpreter 🤖',
Expand Down
3 changes: 0 additions & 3 deletions tools/digested/digested.spec.js

This file was deleted.

1 change: 1 addition & 0 deletions tools/digested/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const processPackage = ({ drGen, workspaces, banner }) =>
* " * [inherent](//repo.biz/packages/inherent) - functional utilities for primitives ⛺️",
* " * [kiddo](//repo.biz/packages/kiddo) - child processes in the future 👶",
* " * [knot](//repo.biz/packages/knot) - functional utilities for strings 🪢",
* " * [manacle](//repo.biz/packages/manacle) - make conventions into rules, magically 🔒",
* " * [monocle](//repo.biz/packages/monocle) - inspect code and apply rules, magically 🧐",
* " * [monorail](//repo.biz/packages/monorail) - plugins for smug grins 🚂",
* " * [robot-tourist](//repo.biz/packages/robot-tourist) - human-centric source code interpreter 🤖",
Expand Down

0 comments on commit f2fa49f

Please sign in to comment.