Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump deps #2

Merged
merged 8 commits into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* eslint-disable */
import type { TestingLibraryMatchers } from '@types/testing-library__jest-dom/matchers'

declare module '@jest/expect' {
export interface Matchers<R = void, T = {}> extends TestingLibraryMatchers<typeof expect.stringContaining, R> {}
}
6,067 changes: 3,663 additions & 2,404 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 24 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"private": true,
"devDependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/preact": "^3.2.2",
"@types/chrome": "^0.0.193",
"@types/jest": "^27.0",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"eslint": "^8.20.0",
"eslint-plugin-jest": "^26.6.0",
"jest": "^27.0",
"jest-environment-jsdom": "^27.0",
"ts-jest": "^27.0",
"typescript": "^4.7.4"
"@testing-library/jest-dom": "^5.16",
"@testing-library/preact": "^3.2",
"@types/chrome": "^0.0.209",
"@types/jest": "^29.2",
"@typescript-eslint/eslint-plugin": "^5.48",
"@typescript-eslint/parser": "^5.48",
"eslint": "^8.32",
"eslint-plugin-jest": "^27.2",
"jest": "^29.3",
"jest-environment-jsdom": "^29.3",
"ts-jest": "^29.0",
"typescript": "^4.9"
},
"dependencies": {
"@picocss/pico": "^1.5.3",
"esbuild": "^0.14.50",
"preact": "^10.10.0"
"@picocss/pico": "^1.5",
"esbuild": "^0.17",
"preact": "^10.11"
},
"scripts": {
"build": "esbuild src/worker.ts src/popup.tsx src/options.tsx src/app.css --bundle --drop:console --legal-comments=none --minify --outdir=dist",
Expand All @@ -27,7 +27,7 @@
"lint": "eslint --ext .ts,.tsx --fix .",
"lint:ci": "eslint --ext .ts,.tsx .",
"pack": "cd dist && zip -r trueblock.zip *",
"test": "jest --coverage=true --runInBand",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --coverage=true --runInBand",
"tsc": "tsc --project tsconfig.json --noEmit --watch --preserveWatchOutput"
},
"jest": {
Expand All @@ -52,13 +52,18 @@
"functions": 60
}
},
"preset": "ts-jest",
"extensionsToTreatAsEsm": [".ts", ".tsx"],
"preset": "ts-jest/presets/js-with-ts-esm",
"setupFilesAfterEnv": [
"./src/setupTests.ts"
"<rootDir>/src/setupTests.ts"
],
"testEnvironment": "jsdom",
"transformIgnorePatterns": [
"node_modules/(?!preact)"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "ts-jest",
"^.+\\.jsx?$": "ts-jest"
}
},
"eslintConfig": {
Expand Down
2 changes: 2 additions & 0 deletions src/background/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { jest, expect } from '@jest/globals'

import { syncStorageToDnr } from './index'

describe('sync storage to declarativeNetRequest', () => {
Expand Down
1 change: 1 addition & 0 deletions src/components/OptionsPage/OptionsPage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { h } from 'preact'
import { render, fireEvent, waitFor } from '@testing-library/preact'
import { expect, jest } from '@jest/globals'

import OptionsPage from './'

Expand Down
2 changes: 2 additions & 0 deletions src/components/Popup/Popup.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { h } from 'preact'
import { render } from '@testing-library/preact'

import { expect, jest } from '@jest/globals'

import Popup from './'

const stubOneTab = (url: string) => {
Expand Down
14 changes: 8 additions & 6 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect'

import { jest } from '@jest/globals'

const RuleActionType = {
ALLOW: 'allow',
ALLOW_ALL_REQUESTS: 'allowAllRequests',
Expand Down Expand Up @@ -55,9 +63,3 @@ global.afterEach(() => {
global.chrome = undefined
delete global.chrome
})

// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect'
7 changes: 5 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
"allowSyntheticDefaultImports": true,
"allowJs": true,
"skipLibCheck": true
},
"exclude": [
"node_modules",
"**/node_modules/*"
"coverage",
"dist",
"node_modules"
]
}