-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test suite #15
Comments
This vows test checks for https://github.com/newsdev/archieml-js/tree/inline-comments/test/test-documents |
sorry for mixing this into the inline-comments branch, btw |
Hi @gka - I'm realizing now that the README was missing a step for the existing test suite: there are a series of shared tests available to all parsers in the newsdev/archieml.org repository, but since they're included as a submodule, you have to run $ git submodule update --init
Submodule 'test/archieml.org' (https://github.com/newsdev/archieml.org) registered for path 'test/archieml.org'
Cloning into 'test/archieml.org'...
remote: Counting objects: 480, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 480 (delta 0), reused 0 (delta 0), pack-reused 477
Receiving objects: 100% (480/480), 331.45 KiB | 0 bytes/s, done.
Resolving deltas: 100% (171/171), done.
Checking connectivity... done.
Submodule path 'test/archieml.org': checked out 'b2e516d590097f18c693d775edcbc1ebbef6111b'
$ nodeunit
loader
✔ loaderTests
shared
✔ sharedTests
OK: 170 assertions (95ms) That shared test model obviously has some disadvantages though, since it requires A) git submodules, and B) the way that the source AML and expected JSON output are included in the same file is unfamiliar to everyone but me at 2 a.m.: Example test
The I kind of liked how that kept the source and expected output within the same file (just for ease of editing), but maybe it's worth splitting them into separate files like you had if that's a more familiar pattern to others? We can also get rid of the submodule and check the tests directly into the app so it's more straightforward to run + edit, but if so we should find another way to keep the tests in sync? |
I think it would make sense to add some real tests for archieml-js, maybe in form of a proper
vows.js
test suite. I don't get how the currentphantomjs
tests are supposed to be working, runningnpm test
does nothing, since there is notest/vendor/runner.js
andtest/index.html
in the repo.Any objections?
The text was updated successfully, but these errors were encountered: