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

Specs never found #39

Open
phtrivier opened this issue Mar 20, 2014 · 4 comments
Open

Specs never found #39

phtrivier opened this issue Mar 20, 2014 · 4 comments

Comments

@phtrivier
Copy link

Given the following structure

project/
   Gruntfile.js
   spec/
      someSpec.js

In spec/someSpec.js , I have :

var assert = require("assert");
describe('something', function(){
    it('should do stuff', function(){
        assert.equal(0, 42);
    });
});

And my Gruntfile has this config for jasmine_node :

      jasmine_node : {
          test : {
              options : {
                  forceExit: true,
                  match: '.',
                  matchall: false,
                  extensions: 'js',
                  specNameMatcher: 'spec',
              },
              all : ["spec/"]
          }
      }

Tests are never run :

grunt jasmine_node:test

Running "jasmine_node:test" (jasmine_node) task
util.print: Use console.log instead
undefinedutil.print: Use console.log instead


Finished in 0.001 secondsutil.print: Use console.log instead

util.print: Use console.log instead
0 tests, 0 assertions, 0 failures
util.print: Use console.log instead

util.print: Use console.log instead


Done, without errors.

I'm obviously missing something huge, but I can't figure out what...

@s9tpepper
Copy link
Member

Your test is named "someSpec.js" and your specNameMatcher is "spec".
Change the specNameMatcher to "Spec", or change your test to "some_spec.js".

@phtrivier
Copy link
Author

I tried that, but it does not work either.

@chesleybrown
Copy link

I'm using OSX and it seems to work regardless of the casing used for specNameMatcher or in the filenames. Using version 0.2.1.

@Hampei
Copy link

Hampei commented Mar 11, 2015

@phtrivier, did you ever figure this out? I'm running into the same problem.

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

4 participants