Skip to content

Commit

Permalink
Make tests work again
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Apr 7, 2022
1 parent bdb8501 commit f37919c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions packages/source/jest.config.js
Expand Up @@ -10,9 +10,4 @@ export default {
"^.+\\.(js|jsx)$": "babel-jest",
},
extensionsToTreatAsEsm: [".ts", ".tsx"],
globals: {
"ts-jest": {
useESM: true,
},
},
};
2 changes: 1 addition & 1 deletion packages/source/package.json
Expand Up @@ -21,7 +21,7 @@
"build-cjs": "babel --config-file ../../babel.cjs.json ./src -d dist/cjs --ignore '**/*.stories.tsx','src/stories/*.tsx' --extensions .ts,.tsx",
"build-types": "tsc -p tsconfig.types.json",
"lint": "eslint src --ext .ts,.tsx",
"test": "NODE_OPTIONS='--experimental-vm-modules --experimental-modules' jest"
"test": "NODE_OPTIONS='--experimental-modules' jest"
},
"repository": {
"type": "git",
Expand Down
1 change: 0 additions & 1 deletion packages/source/src/setupTests.ts
@@ -1,5 +1,4 @@
import "@testing-library/jest-dom";
import { jest } from "jest-without-globals";

jest.mock("styled-components", () => {
const actual = jest.requireActual("styled-components") as typeof import("styled-components");
Expand Down
2 changes: 1 addition & 1 deletion packages/source/src/use-data-source.test.tsx
@@ -1,6 +1,6 @@
import * as React from "react";
import { render, screen } from "@testing-library/react";
import { describe, test, expect } from "jest-without-globals";
// import { describe, test, expect } from "jest-without-globals";
import { GridCellKind, isSizedGridColumn, TextCell, Item } from "@glideapps/glide-data-grid";
import { useColumnSort } from ".";
import { compareSmart } from "./use-column-sort";
Expand Down
1 change: 1 addition & 0 deletions packages/source/tsconfig.json
Expand Up @@ -4,6 +4,7 @@
"esModuleInterop": true,
"jsx": "react",
"moduleResolution": "node",
"module": "esnext",
"noImplicitAny": true,
"noUnusedLocals": true,
"skipLibCheck": true,
Expand Down

0 comments on commit f37919c

Please sign in to comment.