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

Browser test suite #54

Closed
kriskowal opened this issue Mar 16, 2012 · 8 comments
Closed

Browser test suite #54

kriskowal opened this issue Mar 16, 2012 · 8 comments
Assignees

Comments

@kriskowal
Copy link
Owner

We need a way to run tests in browsers to validate the releases. @Gozala’s CommonJS unit test suite work great in Node.

We must have a solution that works for both browsers and Node. I would accept a temporary solution that ports the tests to Jasmine or something. I would accept a solution that embeds a mini module loader to run the tests client-side.

@domenic
Copy link
Collaborator

domenic commented Mar 16, 2012

On first thought the best route is to use something like lobrow to get dirt-simple Node-modules-in-the-browser up and running. I also think @substack had a recent one but I can't find it in his monster list of public repositories.

@Gozala/test-commonjs seems like it would work pretty well in such an environment, since it doesn't depend on much environment, and is already browser-compatible in at least some fashion (AMD might be involved?).


Another option would be to have a compile step for the tests that wraps them in and AMD wrapper to be used alongside @Gozala/test-commonjs. I believe @jrburke/r.js can do this.

@Gozala
Copy link
Collaborator

Gozala commented Mar 16, 2012

In fact I have version of test-commonjs somewhere that can run tests in browser, using some AMD like module loader. It's far from being pretty but it runs tests and logs results to the screen. I could share it with you if that helps, but I'm not able to put much effort in making it first-class for now.

@domenic
Copy link
Collaborator

domenic commented Mar 16, 2012

@Gozala That sounds excellent, since I think our goal is just to check that we didn't break anything.

@Gozala
Copy link
Collaborator

Gozala commented Mar 16, 2012

@domenic Ok I'll try to do it over the weekend & maybe provide a patch for q that would do that!

@kriskowal
Copy link
Owner Author

I’ve got a pull request open for promise support in Jasmine.

jasmine/jasmine#202

@domenic
Copy link
Collaborator

domenic commented Apr 21, 2012

I think the best stack right now would be BusterJS for native "return a then-able" support + Chai + Chai as Promised. I haven't used BusterJS yet but the latter two are working great in our project at work.

@kriskowal
Copy link
Owner Author

Ok. If Buster doesn’t work out, we can use Jasmine instead. It’s relatively straightforward to monkey-patch jasmine.Block.execute.

@kriskowal
Copy link
Owner Author

Landed in v0.8.5

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

No branches or pull requests

3 participants