Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[tests] dexie-relationships integration test broken? #645

Closed
adamJLev opened this issue Jan 22, 2018 · 4 comments
Closed

[tests] dexie-relationships integration test broken? #645

adamJLev opened this issue Jan 22, 2018 · 4 comments

Comments

@adamJLev
Copy link

I was trying to investigate an issue dfahlander/dexie-relationships#29
when I found that even just running the current test for it in Dexie doesn't work.

Any ideas? thanks!
PS- dexie is awesome!

# ~/dev/github/dexie.js/test/integrations on git:master x [14:05:17]
$ yarn test
yarn run v1.3.2
$ npm run test:dexie-relationships

> dexie-integration-tests@1.0.0 test:dexie-relationships /Users/ajl/dev/github/dexie.js/test/integrations
> just-build dexie-relationships

Package: /Users/ajl/dev/github/dexie.js/test/integrations
Transpile JS to ES5
(node)> tsc --allowJs --moduleResolution node --lib es2015,dom -t es5 -m es2015 --outDir tmp/es5 --rootDir .. --sourceMap dexie-relationships/index.js
Generate UMD module bundle
(node)> rollup -c dexie-relationships/rollup.config.js
Start the tests
(node)> karma start dexie-relationships/karma.conf.js --single-run
Browser-suite: local
Browsers to test: Chrome

START:
22 01 2018 14:05:23.092:WARN [watcher]: Pattern "/Users/ajl/dev/github/dexie.js/!(node_modules|tmp)*/*.map" does not match any file.
22 01 2018 14:05:23.093:WARN [watcher]: Pattern "/Users/ajl/dev/github/dexie.js/dist/dexie.js" does not match any file.
22 01 2018 14:05:23.094:WARN [watcher]: Pattern "/Users/ajl/dev/github/dexie.js/test/integrations/node_modules/dexie-relationships/dist/*.map" does not match any file.
22 01 2018 14:05:23.097:WARN [watcher]: All files matched by "/Users/ajl/dev/github/dexie.js/node_modules/qunitjs/qunit/qunit.js" were excluded or matched by prior matchers.
22 01 2018 14:05:23.105:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:19144/
22 01 2018 14:05:23.105:INFO [launcher]: Launching browser Chrome with unlimited concurrency
22 01 2018 14:05:23.109:INFO [launcher]: Starting browser Chrome
22 01 2018 14:05:31.702:INFO [Chrome 63.0.3239 (Mac OS X 10.13.2)]: Connected on socket G9FPkNJfOcOxAc_wAAAA with id manual-745
Chrome 63.0.3239 (Mac OS X 10.13.2) ERROR
  Uncaught TypeError: Cannot use 'in' operator to search for 'default' in undefined
  at http://0.0.0.0:19144test/integrations/dexie-relationships/test-bundle.js:7
22 01 2018 14:06:23.104:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
22 01 2018 14:06:25.109:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
22 01 2018 14:06:27.112:WARN [launcher]: Chrome was not killed by SIGKILL in 2000 ms, continuing.

Finished in 0.116 secs / 0 secs @ 14:06:27 GMT+0300 (EAT)

SUMMARY:
✔ 0 tests completed
just-build dexie-relationships failed. karma start dexie-relationships/karma.conf.js --single-run returned 1
✨  Done in 67.59s.
@adamJLev
Copy link
Author

Hmm actually even just doing npm test at the root of the project doesn't work.
I reviewed https://github.com/dfahlander/Dexie.js/blob/master/CONTRIBUTING.md and dont' see anything special instructons.

When simply doing npm test the root of dexie with latest master:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'test:unit' ]
2 info using npm@5.5.1
3 info using node@v8.9.3
4 verbose run-script [ 'pretest:unit', 'test:unit', 'posttest:unit' ]
5 info lifecycle dexie@2.0.1~pretest:unit: dexie@2.0.1
6 info lifecycle dexie@2.0.1~test:unit: dexie@2.0.1
7 verbose lifecycle dexie@2.0.1~test:unit: unsafe-perm in lifecycle true
8 verbose lifecycle dexie@2.0.1~test:unit: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/ajl/dev/github/dexie.js/node_modules/.bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/ajl/dev/github/dexie.js/node_modules/.bin:/Users/ajl/.rvm/gems/ruby-2.1.0/bin:/Users/ajl/.rvm/gems/ruby-2.1.0@global/bin:/Users/ajl/.rvm/rubies/ruby-2.1.0/bin:/Users/ajl/.pythonz/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/ajl/local/bin:/Users/ajl/local/node/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/mysql/bin:/Users/ajl/Dropbox/dev/ec2/bin:/Users/ajl/Dropbox/dev/ec2/AWS-ElasticBeanstalk-CLI/eb/macosx/python2.7:/Users/ajl/Dropbox/dev/ec2/RDS-CLI/bin:/Users/ajl/.rvm/bin
9 verbose lifecycle dexie@2.0.1~test:unit: CWD: /Users/ajl/dev/github/dexie.js
10 silly lifecycle dexie@2.0.1~test:unit: Args: [ '-c', 'karma start test/karma.conf.js --single-run' ]
11 silly lifecycle dexie@2.0.1~test:unit: Returned: code: 1  signal: null
12 info lifecycle dexie@2.0.1~test:unit: Failed to exec test:unit script
13 verbose stack Error: dexie@2.0.1 test:unit: `karma start test/karma.conf.js --single-run`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid dexie@2.0.1
15 verbose cwd /Users/ajl/dev/github/dexie.js
16 verbose Darwin 17.3.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test:unit"
18 verbose node v8.9.3
19 verbose npm  v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error dexie@2.0.1 test:unit: `karma start test/karma.conf.js --single-run`
22 error Exit status 1
23 error Failed at the dexie@2.0.1 test:unit script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@dfahlander
Copy link
Collaborator

Doesn't sound good. Maybe your version of npm / nodejs needs to be udpated? Maybe it's a hidden dependency of the chrome browser?

I just verified to clone a new clean version of https://github.com/dfahlander/Dexie.js on a new computer (a mac) with npm / node and chrome installed and all tests pass. The karma environment could be sensitive to platform configs eventually, since it needs a browser to launch and run the tests within, and it's configured to test with chrome by default.

@dfahlander
Copy link
Collaborator

I was also successful doing:

cd test/integrations
npm install
npm test

Also here, a chrome window is lauching doing the tests and closed again when done.

  dexie-relationships-basics
    ✔ many-to-one - should be possible to retrieve an entity with a collection of referring entities attached to it
    ✔ one-to-one - should be possible to retrieve entity with a foreign key to expand that foreign key
    ✔ Multiple foreign keys of different kind - Should be possible to retrieve entities with oneToOne as well as manyToOne relations
    ✔ Navigation properties should be non-enumerable
    ✔ Sample from README - should be possible to copy and paste the sample from

@adamJLev
Copy link
Author

Hmm yes looks like a good ol rm -rf node_modules did the trick, maybe a temporarily broken dependency. All good now 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants