Closed ackalker closed 10 years ago
Quick-fixing the paths to QUnit files leads to yet more errors about missing files, notably .../tests/client/components/requirejs/require.js
and .../tests/client/tests/client/testsetup.js
.
Actually those first few ones I don't think are test failures. These are errors that happen during 'normal' operation (resolving / looking for stuff scipted will look for files in several places and results in a exception that is handled when these don't exist. The exceptions are getting logged to the console which is confusing, but the tests themselves are actually passing.
The QUnit error I have seen before and that is a real failure there. It has something to do with how the client side tests are running. Unfortunately I'm not that familiar with the client-side code/tests.
Looks like you are trying to get to the bottom of that. If you manage it please let me know what changes you made to get client-side tests running again.
Thanks for the quick reply :-) I will push the QUnit fix and add the part of the log with the resulting other errors.
EDIT: Yes, the path to qunit.js
is that strange. It appears to have been fixed in newer versions.
wow, sorry about that :-)
I used hub pull-request -i <#issue>
, which gave me the warning:
Warning: Issue to pull request conversion is deprecated and might not work in the future.
and then spammed this conversation with all the old commits.
Guess I should have used git push --all ...
With the proposed fix, all clientTests
pass.
The clientServerTests
progress up to:
Starting to find completions in /home/miki/vcs/git/node-modules/scripted/tests/client/test-resources/completions/test4.scripted-completions
Client requested content assist templates complete
Processing get request for /home/miki/vcs/git/node-modules/scripted/tests/client/test-resources/foo.js
and then appears to hang . Killing the test runner with ^C
does clean up all processes, so it isn't a freeze.
I pulled those changes but still getting the same error that 'QUnit' isn't defined.
I'm confused now. I tried to go back to older commits to find where this actually broke. The tests passing at 'Upgrade to doctrine 0.0.4'. Then I went forward one commit at a time and tried to run the tests again. Finally... all tests are passing on the current dev branch with none of your fixes in.
I don't have time right now to look into it further. I'm guessing probably something todo with bower component being in wrong/different place.
I didn't actually run bower to install all the client-side modules.
I'm guessing me and you are probably using different versions of QUnit somehow.
Are you working from a clean clone on dev
branch?
I normally do:
$ git clean -dfx # make sure you've committed / backed up _all_ local changes, _including_ untracked files!!
$ git status # Be sure to be on 'dev' branch
$ git reset --hard # force everything to tip of branch (i.e. 'dev')
$ npm install
$ npm test
Also, I've noticed that npm install
postinstall step appears to use the version of bower
installed within scripted/node_modules/bower
, which makes working with a globally-installed bower
from the command line difficult. For one, newer bower
now requires name
property in component.json
, etc., so better use the one included in scripted.
This is output on my system:
$ cd client && ../node_modules/bower/bin/bower list
bower discover Please wait while newer package versions are being discovered
/home/miki/vcs/git/node-modules/scripted/client
├── curl#0.7.3 (0.8.8 now available)
├── doctrine#0.0.4 (0.2.0 now available)
├── json5#0.1.0 (0.3.0 now available)
├── meld#1.1.0 (1.3.0 now available)
├── probes#0.1.0
├── qunit#1.10.0 (1.14.0 now available)
├── requirejs#2.1.4 (2.1.10 now available)
├── requirejs-i18n#2.0.1 (2.0.4 now available)
├── requirejs-text#2.0.4 (2.0.10 now available)
├─┬ rest#0.8.4 (1.0.0 now available)
│ └── when#1.7.1 (2.8.0 now available)
├── when#1.7.1 (2.8.0 now available)
└── wire#0.9.0 (0.10.5 now available)
Note that qunit
is an old version which has qunit.js
in the odd path.
Please compare.
I've merged the PR into 'dev' branch. Github is not auto closing it because it looks like it wants to see that PR merged into master. So I'm closing it manually.
Although the list command you gave me shows same version of QUnit it must actually be a different one somehow.
I git cleaned and reran npm install and tests are all passing for me with your path fixes in the mix. So I merged in the pull request.
Build passed all tests on travis: https://travis-ci.org/scripted-editor/scripted/builds/18372736
Congrats! :-) Thanks for merging.
Running
npm test
on clean Git clone,dev
branch, I get multiple test failures related to wrong file paths. Some examples (full log available on request):Further down:
and finally failing with:
Another thing worth mentioning:
phantomjs
is required to be installed globally, but not mentioned in the Wiki.