-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
I am confused as to how to run tests for Docson (and add tests for bugs I’m trying to fix, which is my actual motivation). Here is what I tried:
- README.md refers to http://lbovet.github.io/docson/tests/test.html, however the current version of that file does not seem to work – it seems to have been left behind in the move of several things to public/. I can fix the paths, but then I discover that public/docson.js used by it seems to be outdated – it is not updated by
npm run build, unlike the files in public/js. There however seems to be no usable replacement for it, I cannot find an output file that is both loadable in the browser (is not a CommonJS module, unlike lib/index.js) and exports thedocsonAPI without already using it (unlike public/js/webpage.js). - integration/README.md has some instructions. When I follow them (plus
npm -g install nightwatch, which is not mentioned), I get the messageError: Cannot read test source location: /Users/cwalther/Documents/json-schema-tools/docson/nightwatch. I suspect this is a sign of bitrot too, since a folder nightwatch has existed once, before it was renamed to integration, and therefore stop searching in this direction. - I seem to have some success with
node_modules/.bin/jest, which I try on a whim based on the presence of a jest.config.js. When run like that, it gets stuck with one test suite passing and the other still running (I think I have a fix for that and will follow up with a pull request), but when run individually (node_modules/.bin/jest integration/widget.test.js,node_modules/.bin/jest integration/basic.test.js), they pass. So it that the proper way?
Could any outdated things please be removed from the repository, or clearly marked as outdated?
If there is a supported automated way of running tests, I would also suggest naming it as scripts.test in package.json so that no detective work is required to find it.
Metadata
Metadata
Assignees
Labels
No labels