mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
Co-authored-by: liuxingbaoyu <[email protected]> Co-authored-by: Nicolò Ribaudo <[email protected]>
24 lines
822 B
JavaScript
24 lines
822 B
JavaScript
import _getOptionSpecificExcludesFor from "../lib/get-option-specific-excludes.js";
|
|
const getOptionSpecificExcludesFor =
|
|
_getOptionSpecificExcludesFor.default || _getOptionSpecificExcludesFor;
|
|
|
|
describe("defaults", () => {
|
|
describe("getOptionSpecificExcludesFor", () => {
|
|
it("should return correct excludes for `loose` mode", () => {
|
|
const defaultWebIncludesForChromeAndNode = getOptionSpecificExcludesFor({
|
|
loose: true,
|
|
});
|
|
expect(defaultWebIncludesForChromeAndNode).toEqual([
|
|
"transform-typeof-symbol",
|
|
]);
|
|
});
|
|
|
|
it("shouldn't return excludes for non-`loose` mode", () => {
|
|
const defaultWebIncludesForChromeAndNode = getOptionSpecificExcludesFor({
|
|
loose: false,
|
|
});
|
|
expect(defaultWebIncludesForChromeAndNode).toBeNull();
|
|
});
|
|
});
|
|
});
|