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

docs for meta-generated tests #57

Closed
tj opened this issue Nov 19, 2011 · 6 comments
Closed

docs for meta-generated tests #57

tj opened this issue Nov 19, 2011 · 6 comments
Labels
area: documentation anything involving docs or mochajs.org

Comments

@tj
Copy link
Contributor

tj commented Nov 19, 2011

No description provided.

@felixrabe
Copy link

+1

@felixrabe
Copy link

Would this be similar to PHPUnit data providers, or rather like this?

function genTests(db) {
  test('one thing', function() { /* ... */ });
  test('another thing', function() { /* ... */ });
};

suite('In-memory database', function() {
  genTests(new InMemoryDB());
});

suite('Remote database', function() {
  genTests(new RemoteDB('10.1.1.1'));
});

suite('Filesystem database', function() {
  genTests(new FilesystemDB(__dirname + '/_test.db'));
});

@boneskull
Copy link
Contributor

I have no idea what this ticket even is. @felixrabe can you enlighten me?

@boneskull boneskull added the area: documentation anything involving docs or mochajs.org label Sep 13, 2014
@felixrabe
Copy link

@boneskull On http://visionmedia.github.io/mocha/, Cmd-F for "meta-generate". It appears exactly once, in the features section:

  • easily meta-generate suites & test-cases

But it is not described anywhere.

@boneskull
Copy link
Contributor

Hm. I don't know what the hell "meta-generation" is, but my WAG is creating describe() and it() blocks in a loop, or conditionally, or whathaveyou.

It'd be cool to have the "recommended way" to do this in the docs or wiki.

@felixrabe
Copy link

I don't know how it is intended / recommended to work, but I'm using my example above just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org
Projects
None yet
Development

No branches or pull requests

3 participants