Skip to content

Commit

Permalink
Chore: Add test for valid non-string input (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonegray committed Dec 18, 2020
1 parent 1b99259 commit 3b4ca9e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/lib/parse.js
Expand Up @@ -96,5 +96,14 @@ describe("parse()", () => {
espree.parse("foo", Object.freeze({ ecmaFeatures: Object.freeze({}) }));
});

it("Cast valid non-string input", () => {
const str = "var foo = bar;";

assert.deepStrictEqual(
espree.parse(Buffer.from(str)),
espree.parse(str)
);
});

});
});

0 comments on commit 3b4ca9e

Please sign in to comment.