Skip to content

Commit

Permalink
Chore: Add test for valid non-string input (eslint#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonegray committed Dec 27, 2020
1 parent 32c756e commit 0f2f18d
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 0f2f18d

Please sign in to comment.