Skip to content

Commit

Permalink
test: assert the contents of the result
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Jan 13, 2020
1 parent ea26b7c commit 6834402
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ test("plugin will hash sourcemap with includeMap", () => {
map: { inline: false },
})
.then(result => {
const hash = utils.hash(
'.a {}\n/*# sourceMappingURL=file01.88aab.css.map */',
opts.algorithm,
opts.trim
);
const expectedOutput = '.a {}\n/*# sourceMappingURL=file01.88aab.css.map */';
const hash = utils.hash(expectedOutput, opts.algorithm, opts.trim);

expect(result.css).toEqual(expectedOutput);
expect(result.opts.to).toMatch(new RegExp(hash));
expect(result.warnings().length).toBe(0);
});
Expand Down

0 comments on commit 6834402

Please sign in to comment.