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

add jasmine #3

Closed
testdouble opened this issue Jul 23, 2012 · 1 comment
Closed

add jasmine #3

testdouble opened this issue Jul 23, 2012 · 1 comment
Assignees

Comments

@testdouble
Copy link

We should probably have jasmine. I'm pretty sure I'm under contract to never publish anything JavaScript-related without it.

@searls
Copy link
Member

searls commented Jul 26, 2012

@davemo -- i just successfully pulled in testacular for a spike on a new branch.

Here's some output

$ grunt spec
path.existsSync is now called `fs.existsSync`.
Running "configure" task

Running "spec" task
info (config): /Users/justin/code/javascript/lineman/config/spec.js 

info: Web server started at http://localhost:9101
info (launcher): Starting  browser "PhantomJS"
info (watcher): Watching "/Users/justin/tmp/foo/a/node_modules/testacular/adapter/jasmine.js"
info (watcher): Watching "/Users/justin/tmp/foo/a/spec"
info (watcher): Watching "/Users/justin/tmp/foo/a/app/js"
info (watcher): Watching "/Users/justin/tmp/foo/a/node_modules/testacular/adapter/lib/jasmine.js"
info (PhantomJS 1.6): Connected on socket id nJPRBaliHB7gX0vSwRME

PhantomJS 1.6   FAILED
    Expected 'foo' to be 'fooz'.

PhantomJS 1.6: Executed 1 of 1 (1 FAILED) (0.018 / 0.003 secs)
info: Disconnecting all browsers
<WARN> Spec execution failed with exit code 1 Use --force to continue. </WARN>

Aborted due to warnings.
justin@Searls-Air:~/tmp/foo/a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  [01:27:34]
$ grunt spec --force
path.existsSync is now called `fs.existsSync`.
Running "configure" task

Running "spec" task
info (config): /Users/justin/code/javascript/lineman/config/spec.js 

info: Web server started at http://localhost:9101
info (launcher): Starting  browser "PhantomJS"
info (watcher): Watching "/Users/justin/tmp/foo/a/node_modules/testacular/adapter/jasmine.js"
info (watcher): Watching "/Users/justin/tmp/foo/a/spec"
info (watcher): Watching "/Users/justin/tmp/foo/a/app/js"
info (watcher): Watching "/Users/justin/tmp/foo/a/node_modules/testacular/adapter/lib/jasmine.js"
info (PhantomJS 1.6): Connected on socket id pDDYHh-kxtPVb3yIwSps

PhantomJS 1.6   FAILED
    Expected 'foo' to be 'fooz'.

PhantomJS 1.6: Executed 1 of 1 (1 FAILED) (0.017 / 0.002 secs)
info: Disconnecting all browsers
<WARN> Spec execution failed with exit code 1 Used --force, continuing. </WARN>

Done, but with warnings.
justin@Searls-Air:~/tmp/foo/a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  [01:27:39]
$ grunt spec
path.existsSync is now called `fs.existsSync`.
Running "configure" task

Running "spec" task
info (config): /Users/justin/code/javascript/lineman/config/spec.js 

info: Web server started at http://localhost:9101
info (launcher): Starting  browser "PhantomJS"
info (watcher): Watching "/Users/justin/tmp/foo/a/node_modules/testacular/adapter/jasmine.js"
info (watcher): Watching "/Users/justin/tmp/foo/a/spec"
info (watcher): Watching "/Users/justin/tmp/foo/a/app/js"
info (watcher): Watching "/Users/justin/tmp/foo/a/node_modules/testacular/adapter/lib/jasmine.js"
info (PhantomJS 1.6): Connected on socket id feaT-TiA8KAs9GQwwWNI
.
PhantomJS 1.6: Executed 1 of 1 SUCCESS (0.018 / 0.002 secs)
info: Disconnecting all browsers

Done, without errors.
justin@Searls-Air:~/tmp/foo/a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  [01:27:54]
$ 

I really dig this for one-time runs. If a failure occurs, it knows to break the build, but b/c it uses grunt.warn, the convention is you can "--force" your way past the warning, so if you want to ignore test failures you can.

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

1 participant