Skip to content

Commit

Permalink
Remove jest
Browse files Browse the repository at this point in the history
  • Loading branch information
matttdawson committed Jan 30, 2025
1 parent 2637cce commit de5ee65
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
"react-app"
]
},
"browserslist": {
Expand Down
36 changes: 18 additions & 18 deletions rollup.config.cjs
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
const peerDepsExternal = require("rollup-plugin-peer-deps-external");
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
const typescript = require("rollup-plugin-typescript2");
const postcss = require("rollup-plugin-postcss");
const copy = require("rollup-plugin-copy");
const json = require("@rollup/plugin-json");
const path = require("path");
const peerDepsExternal = require('rollup-plugin-peer-deps-external');
const resolve = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const typescript = require('rollup-plugin-typescript2');
const postcss = require('rollup-plugin-postcss');
const copy = require('rollup-plugin-copy');
const json = require('@rollup/plugin-json');
const path = require('path');

const packageJson = require("./package.json");
const outputDir = "dist";
const packageJson = require('./package.json');
const outputDir = 'dist';

const postcssOptions = () => ({
extensions: [".scss"],
extensions: ['.scss'],
extract: false,
minimize: true,
use: {
stylus: undefined,
less: undefined,
sass: {
includePaths: [
"./node_modules",
'./node_modules',
// This is only needed because we're using a local module. :-/
// Normally, you would not need this line.
path.resolve(__dirname, "..", "node_modules"),
path.resolve(__dirname, '..', 'node_modules'),
],
},
},
});

module.exports = {
input: "./src/index.ts",
input: './src/index.ts',
output: [
{
file: packageJson.main,
format: "cjs",
format: 'cjs',
sourcemap: true,
},
{
file: packageJson.module,
format: "esm",
format: 'esm',
sourcemap: true,
},
],
Expand All @@ -47,14 +47,14 @@ module.exports = {
resolve({ preferBuiltins: true }),
commonjs(),
typescript({
exclude: ["src/stories/**/*.*"],
exclude: ['src/stories/**/*.*'],
}),
postcss(postcssOptions()),
json(),
copy({
targets: [
{
src: "src/styles/GridTheme.scss",
src: 'src/styles/GridTheme.scss',
dest: `${outputDir}`,
},
],
Expand Down
1 change: 1 addition & 0 deletions src/lui/reactUtils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { screen } from '@testing-library/dom';
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ReactElement, useEffect, useState } from 'react';
import { describe, expect, test } from 'vitest';

import { usePrevious } from './reactUtils';

Expand Down
3 changes: 2 additions & 1 deletion src/utils/textMatcher.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { textMatch } from './textMatcher';
import { describe, expect, test } from 'vitest';

import { textMatch } from './textMatcher';
/**
* "L" => L*
* "=L" => L
Expand Down
3 changes: 2 additions & 1 deletion src/utils/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { isFloat, sanitiseFileName } from './util';
import { describe, expect, test } from 'vitest';

import { isFloat, sanitiseFileName } from './util';
describe('sanitiseFileName', () => {
test('isFloat', () => {
expect(isFloat('')).toBe(false);
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"include": ["src", "./vite.config.ts"],
"files": ["node_modules/jest-expect-message/types/index.d.ts"],
"compilerOptions": {
"baseUrl": "./src",
"module": "esnext",
Expand Down

0 comments on commit de5ee65

Please sign in to comment.