Commit 863f73df authored by David Sveningsson's avatar David Sveningsson
Browse files

fix(deps): support jest v27


Signed-off-by: HTML-validate's avatarHTML-validate <gitlab@html-validate.org>
parent c8f7d6df
Pipeline #310934092 passed with stages
in 9 minutes and 39 seconds
......@@ -28,7 +28,8 @@
"rules": {
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-non-null-assertion": "off",
"tsdoc/syntax": "off"
}
}
]
......
......@@ -102,7 +102,7 @@ Docs:
before_script:
- npm ci
script:
- npm test
- npm test -- --no-coverage --testPathIgnorePatterns matchers tests/jest
- npm run --if-present build
- npm run compatibility
......@@ -122,6 +122,19 @@ Node 16.x (current):
<<: *compat
image: node:16
Jest compat:
stage: compatibility
dependencies: []
needs: []
parallel:
matrix:
- VERSION: [24, 25, 26, 27]
before_script:
- npm ci
- npm install --force jest@${VERSION}.0.0 ts-jest@${VERSION}.0.0
script:
- npm exec jest -- --no-coverage matchers tests/jest
Release:
stage: release
only:
......
This diff is collapsed.
......@@ -176,8 +176,8 @@
"grunt-sass": "3.1.0",
"highlight.js": "10.7.2",
"husky": "6.0.0",
"jest": "26.6.3",
"jest-diff": "26.6.2",
"jest": "27.0.1",
"jest-diff": "27.0.1",
"jquery": "3.6.0",
"lint-staged": "11.0.0",
"load-grunt-tasks": "5.1.0",
......@@ -186,14 +186,22 @@
"npm-pkg-lint": "1.3.0",
"postcss": "8.3.0",
"prettier": "2.3.0",
"pretty-format": "26.6.2",
"pretty-format": "27.0.1",
"sass": "1.34.0",
"semantic-release": "17.4.3",
"serve-static": "1.14.1",
"stringmap": "0.2.2",
"ts-jest": "26.5.6",
"ts-jest": "27.0.1",
"typescript": "4.3.2"
},
"peerDependencies": {
"jest": "^24 || ^25 || ^26 || ^27"
},
"peerDependenciesMeta": {
"jest": {
"optional": true
}
},
"engines": {
"node": ">= 10.0"
},
......
/**
* @jest-environment jsdom
*/
jest.mock("./config/default", () => {
return {
extends: ["html-validate:recommended"],
......
/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/ban-ts-comment, prefer-template, sonarjs/no-duplicate-string */
import diff from "jest-diff";
import * as jestDiff from "jest-diff";
import deepmerge from "deepmerge";
import { TokenType } from "./lexer";
import { Message, Report, Result } from "./reporter";
......@@ -13,6 +13,8 @@ interface TokenMatcher {
data?: any;
}
const diff = jestDiff?.diff ?? jestDiff;
declare global {
namespace jest {
/* eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unused-vars */
......
/**
* @jest-environment jsdom
*/
import "../../src/matchers";
it("should validate ok", () => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment