Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Nov 2, 2021
1 parent 7692378 commit e1a0f9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions eslint/babel-eslint-tests/test/integration/parser-override.js
@@ -1,7 +1,7 @@
import path from "path";
import { fileURLToPath } from "url";
import { createRequire } from "module";
import * as babelESLint from "@babel/eslint-parser";
import * as babelESLintWorker from "@babel/eslint-parser/experimental-worker";

describe("parserOverride", () => {
const expectedAST = {
Expand Down Expand Up @@ -31,7 +31,11 @@ describe("parserOverride", () => {
expect(ast).toMatchObject(expectedAST);
});

it("works when parsing in a worker", () => {
const babel7node12 = parseInt(process.versions.node) < 12 ? it.skip : it;
babel7node12("works when parsing in a worker", async () => {
const require = createRequire(import.meta.url);
const babelESLintWorker = require("@babel/eslint-parser/experimental-worker");

const { ast } = babelESLintWorker.parseForESLint(`27`, {
filename: "input.js",
babelOptions: {
Expand Down

0 comments on commit e1a0f9b

Please sign in to comment.