Skip to content

Tests always pass #6

@benpolinsky

Description

@benpolinsky

Please correct me if I'm wrong, but it seems the test cases provided will never fail.
This is because you're calling the done() callback with any errors, thus suppressing a possible failed test case.

For example, the following test passes:

it('should preserve order with multiple selectors', function(done){
    Metalsmith('test/fixture')
      .use(markdown())
      .use(headings({ selectors: ['h1', 'h2']}))
      .build(function(err, files){
        if (err) return done(err);
        expect(1).toEqual(2)
        done();
      });
  });

I'd suggest just letting any error through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions