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

test: use promises-es6-tests for additional promise tests #265

Merged
merged 5 commits into from
Jul 3, 2014

Conversation

smikes
Copy link
Contributor

@smikes smikes commented Jun 30, 2014

The promises-es6-tests suite is a spin off of work that I did for @getify 's getify/native-promises-only module.

Eventually the goal with the tests is to convert them to Test262 format and submit them for review and inclusion in Test262 for ECMAScript.

At present they are a set of tests in mocha, using a style and runner very similar to promises-aplus (in fact, stolen from promises-aplus/promises-tests ), but covering ES6-draft-specified features such as Promise.all, Promise.race, etc.

es6-shim promises pass all the tests currently in promises-es6-tests.

/cc @ljharb

@ljharb
Copy link
Collaborator

ljharb commented Jun 30, 2014

This passes for me on the command line, but it'd be nice to have a way to also test it in test/index.html - when I add the script tag, it fails because of the "require", so it'd likely need to be browserified.

@smikes
Copy link
Contributor Author

smikes commented Jun 30, 2014

I will look into that; I only tested from command line and didn't think
about the browser tests.

[edited to remove email cruft]

@cscott
Copy link
Collaborator

cscott commented Jun 30, 2014

Note that the tests are actually run in browser two different ways: once
for humans with a nice ui, and there is another HTML page running with
output to the JS console used for automated testing with testling (although
we don't particularly love testling; any other automated browser test
runner would be as good).
On Jun 30, 2014 3:48 PM, "smikes" [email protected] wrote:

I will look into that; I only tested from command line and didn't think
about the browser tests.

On Jun 30, 2014, at 11:39 AM, Jordan Harband [email protected]
wrote:

This passes for me on the command line, but it'd be nice to have a way to
also test it in test/index.html - when I add the script tag, it fails
because of the "require", so it'd likely need to be browserified.


Reply to this email directly or view it on GitHub
#265 (comment).


Reply to this email directly or view it on GitHub
#265 (comment).

"promises-aplus-tests": "~2.0.4",
"promises-es6-tests": "^0.1.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh also - please don't (ever) use the carat, since it breaks older nodes. Stick with the ~ for maximum compatibility :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm did that, but I have changed it. npm install --save apparently uses "^" since early 2014.

@smikes
Copy link
Contributor Author

smikes commented Jul 1, 2014

Added a bundle/promises-es6-tests.js to my package, and included it in both kinds of browser tests. Verified that the tests run in browser.

Still passes on command line.

No longer uses caret in package.json.

@getify
Copy link

getify commented Jul 1, 2014

@smikes continues to be a test-suite rockstar!

@ljharb
Copy link
Collaborator

ljharb commented Jul 2, 2014

I checked this PR out, npm installed, and the path node_modules/promises-es6-tests/bundle/promises-es6-tests.js didn't exist - so it didn't load in the HTML file.

@smikes
Copy link
Contributor Author

smikes commented Jul 2, 2014

Thanks. Packaging error. I have corrected the npm package (0.3.2 contains bundle/promises-es6-tests.js) and updated the version requirement in package.json.

I missed this because I was using npm link in development.

@smikes
Copy link
Contributor Author

smikes commented Jul 2, 2014

The CI failure is:

Collections Set has an iterator that works with Array.from works with the full set:

I don't see how that's related to the change I just pushed. Any ideas?

@ljharb
Copy link
Collaborator

ljharb commented Jul 3, 2014

Yes, that seems to be a flaky test. I've opened #268 to track that.

ljharb added a commit that referenced this pull request Jul 3, 2014
test: use promises-es6-tests for additional promise tests
@ljharb ljharb merged commit 409caba into paulmillr:master Jul 3, 2014
@smikes smikes deleted the promises-es6-tests branch July 3, 2014 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants