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

Discuss: theoretically.describe #1

Open
hypesystem opened this issue Jan 20, 2016 · 0 comments
Open

Discuss: theoretically.describe #1

hypesystem opened this issue Jan 20, 2016 · 0 comments
Milestone

Comments

@hypesystem
Copy link
Owner

Whereas theoretically.it sets up a single test with a varying value, theoretically.describe would set up an entire section with a varying value:

describe("NumberStack", function() {
  theoretically.describe("empty()", [
    emptyNumberStack,
    numberStackOneElement,
    oneHundredElementNumberStack
  ], function(numberStack) {
    it("removes all elements", function() {
      numberStack.empty();
      expect(numberStack.length).toEqual(0);
      expect(numberStack.pop()).toBeFalsy();
    });
  });
});

(This may not be the best example as it only has a single it in the theoretically.describe. What would be a good example, where several small tests would use the same varying value?)

What are pros/cons of this feature? Should it be added?

@hypesystem hypesystem added this to the v0.2 milestone Jan 20, 2016
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