Skip to content

Commit

Permalink
test: fix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zackad committed Apr 13, 2024
1 parent 34e4c4c commit 8d1a873
Show file tree
Hide file tree
Showing 6 changed files with 277 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jest.eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

module.exports = {
export default {
runner: "jest-runner-eslint",
displayName: "lint",
testMatch: ["<rootDir>/**/*.js"],
Expand Down
2 changes: 1 addition & 1 deletion jest.test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const ENABLE_COVERAGE = false; // !!process.env.CI;

module.exports = {
export default {
displayName: "test",
setupFiles: ["<rootDir>/tests_config/run_spec.js"],
snapshotSerializers: ["<rootDir>/tests_config/raw-serializer.js"],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"resolve": "^1.12.0"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
Expand Down
2 changes: 1 addition & 1 deletion tests_config/raw-serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const RAW = Symbol.for("raw");

module.exports = {
export default {
print(val) {
return val[RAW];
},
Expand Down
9 changes: 6 additions & 3 deletions tests_config/run_spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
"use strict";

const fs = require("fs");
const extname = require("path").extname;
const prettier = require("prettier");
import fs from "fs";
import prettier from "prettier";
import path from "path";
import { beforeAll, test, expect } from "@jest/globals";

const extname = path.extname;

function run_spec(dirname, parsers, options) {
options = Object.assign(
Expand Down
Loading

0 comments on commit 8d1a873

Please sign in to comment.