Skip to content
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

NodeJs, Mocha, StageComponent #55

Closed
kvernon opened this issue Jan 28, 2017 · 4 comments
Closed

NodeJs, Mocha, StageComponent #55

kvernon opened this issue Jan 28, 2017 · 4 comments
Assignees
Labels

Comments

@kvernon
Copy link

kvernon commented Jan 28, 2017

I'm submitting a bug report

  • Library Version:
    major.minor.patch-pre

"dependencies": {
"JSON": "^1.0.0",
"aurelia-animator-css": "^1.0.0",
"aurelia-bootstrapper": "^2.0.1",
"aurelia-dependency-injection": "latest",

"aurelia-fetch-client": "^1.1.0",
"aurelia-framework": "latest",
"aurelia-logging-console": "latest",
"aurelia-polyfills": "^1.1.1",
"aurelia-router": "^1.1.1",
"bluebird": "^3.4.1",
"requirejs": "^2.3.2",
"text": "github:requirejs/text#latest",
"whatwg-fetch": "^2.0.1"
},
"devDependencies": {
"aurelia-cli": "^0.23.0",
"aurelia-pal": "^1.2.0",
"aurelia-pal-browser": "latest",
"aurelia-pal-nodejs": "^1.0.0-beta.1.0.0",
"aurelia-testing": "^1.0.0-beta.2.0.1",
"aurelia-tools": "^1.0.0",
"babel-core": "latest",
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-async-generator-functions": "^6.17.0",
"babel-plugin-transform-class-properties": "^6.19.0",
"babel-plugin-transform-decorators": "^6.13.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2015-loose": "^8.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-es2016": "^6.16.0",
"babel-register": "^6.9.0",
"babel-runtime": "^6.20.0",
"browser-sync": "^2.13.0",
"chai": "^3.5.0",
"connect-history-api-fallback": "^1.2.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-babel": "^6.1.2",
"gulp-changed-in-place": "^2.0.3",
"gulp-eslint": "^2.0.0",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^2.4.0",
"karma": "^0.13.22",
"karma-babel-preprocessor": "^6.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-jasmine": "^1.0.2",
"minimatch": "^3.0.2",
"mocha": "^3.2.0",
"mockery": "^2.0.0",
"requirejs": "^2.3.2",
"sinon": "^1.17.6",
"through2": "^2.0.1",
"uglify-js": "^2.6.3",
"vinyl-fs": "^2.4.3"
},

Please tell us about your environment:

  • Operating System:
    Windows 10 AU

  • Node Version:
    v7.4.0

  • NPM Version:
    4.0.5

  • JSPM OR Webpack AND Version
    I am using Aurelia-Cli

  • Browser:
    all

  • Language:
    ESNext

Current behavior:
my gist shows 2 scenarios of the same test:

  1. with dispose commented out
  2. with the dispose in play

https://gist.github.com/kvernon/dd0a005f5a1b343958f6918a115e1ad5
I will also note, that I do have the component created, but I did not write a gist up for that. it is identical to the one on your site as an example.

Expected/desired behavior:
The expected behavior is for the create method to complete and return a promise

@kvernon
Copy link
Author

kvernon commented Mar 18, 2017

Just an updated...

I've pulled latest packages and it still errors:

"dependencies": {
"JSON": "^1.0.0",
"aurelia-animator-css": "^1.0.0",
"aurelia-bootstrapper": "^2.1.1",
"aurelia-dependency-injection": "latest",
"aurelia-fetch-client": "^1.1.1",
"aurelia-framework": "latest",
"aurelia-logging-console": "latest",
"aurelia-pal-nodejs": "^1.0.0-beta.1.0.0",
"aurelia-polyfills": "^1.2.0",
"aurelia-router": "^1.2.1",
"bluebird": "^3.5.0",
"requirejs": "^2.3.2",
"text": "github:requirejs/text#latest",
"whatwg-fetch": "^2.0.1"
},
"devDependencies": {
"aurelia-cli": "^0.24.0",
"aurelia-pal": "^1.3.0",
"aurelia-pal-browser": "^1.1.0",
"aurelia-pal-nodejs": "^1.0.0-beta.1.0.0",
"aurelia-testing": "^1.0.0-beta.3.0.0",

"aurelia-tools": "^1.0.0",
"babel-core": "latest",
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-async-generator-functions": "^6.17.0",
"babel-plugin-transform-class-properties": "^6.19.0",
"babel-plugin-transform-decorators": "^6.13.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2015-loose": "^8.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-es2016": "^6.16.0",
"babel-register": "^6.9.0",
"babel-runtime": "^6.20.0",
"browser-sync": "^2.13.0",
"chai": "^3.5.0",
"connect-history-api-fallback": "^1.2.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-babel": "^6.1.2",
"gulp-changed-in-place": "^2.0.3",
"gulp-eslint": "^2.0.0",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^2.4.0",
"jasmine": "^2.5.3",
"jasmine-core": "^2.4.1",
"minimatch": "^3.0.2",
"mocha": "^3.2.0",
"mockery": "^2.0.0",
"requirejs": "^2.3.2",
"sinon": "^2.0.0",
"through2": "^2.0.1",
"uglify-js": "^2.6.3",
"vinyl-fs": "^2.4.3"
},

@smithmx
Copy link

smithmx commented Apr 19, 2018

Is this still an active bug? I'm experiencing the same issue.

@Alexander-Taran
Copy link

you can try to
await component.create(bootstrap) in beforeEach
because it seems that afterEach is called as soon as Promise created in the test.

@Alexander-Taran
Copy link

async triageQuestion(id) =>{
 respondSameDay()
 let response = await getResponseFromOP( { timeout : 4weeks } )
 if(!response) {
    closeQuestion(id,randomReason())
 }
}

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

No branches or pull requests

5 participants