Skip to content

Commit 2e768a1

Browse files
authoredFeb 3, 2021
chore: deps and tests (#122)
1 parent 87b86a5 commit 2e768a1

File tree

3 files changed

+1199
-1024
lines changed

3 files changed

+1199
-1024
lines changed
 

‎package-lock.json

+1,173-1,013
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545
"dependencies": {
4646
"ajv": "^6.12.5",
4747
"ajv-keywords": "^3.5.2",
48-
"@types/json-schema": "^7.0.6"
48+
"@types/json-schema": "^7.0.7"
4949
},
5050
"devDependencies": {
51-
"@babel/cli": "^7.12.10",
52-
"@babel/core": "^7.12.10",
53-
"@babel/preset-env": "^7.12.11",
51+
"@babel/cli": "^7.12.13",
52+
"@babel/core": "^7.12.13",
53+
"@babel/preset-env": "^7.12.13",
5454
"@commitlint/cli": "^11.0.0",
5555
"@commitlint/config-conventional": "^11.0.0",
5656
"@webpack-contrib/defaults": "^6.3.0",
@@ -59,16 +59,17 @@
5959
"cross-env": "^7.0.3",
6060
"del": "^6.0.0",
6161
"del-cli": "^3.0.1",
62-
"eslint": "^7.16.0",
63-
"eslint-config-prettier": "^7.1.0",
62+
"eslint": "^7.19.0",
63+
"eslint-config-prettier": "^7.2.0",
6464
"eslint-plugin-import": "^2.22.1",
65-
"husky": "^4.3.6",
65+
"husky": "^4.3.8",
6666
"jest": "^26.6.3",
6767
"lint-staged": "^10.5.3",
6868
"npm-run-all": "^4.1.5",
6969
"prettier": "^2.2.1",
70-
"standard-version": "^9.0.0",
71-
"typescript": "^4.1.3"
70+
"standard-version": "^9.1.0",
71+
"typescript": "^4.1.3",
72+
"webpack": "^5.20.0"
7273
},
7374
"keywords": [
7475
"webpack"

‎test/index.test.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
import webpackSchema from 'webpack/schemas/WebpackOptions.json';
2+
13
import { validate } from '../src';
24

35
import schema from './fixtures/schema.json';
46

57
describe('Validation', () => {
6-
function createSuccessTestCase(name, config, options = {}) {
8+
function createSuccessTestCase(
9+
name,
10+
config,
11+
options = {},
12+
testSchema = schema
13+
) {
714
it(`should pass validation for ${name}`, () => {
815
let error;
916

1017
try {
11-
validate(schema, config, options.name);
18+
validate(testSchema, config, options.name);
1219
} catch (maybeValidationError) {
1320
if (maybeValidationError.name !== 'ValidationError') {
1421
throw maybeValidationError;
@@ -2949,4 +2956,11 @@ describe('Validation', () => {
29492956
},
29502957
(msg) => expect(msg).toMatchSnapshot()
29512958
);
2959+
2960+
createSuccessTestCase(
2961+
'webpack schema',
2962+
{ mode: 'development' },
2963+
{},
2964+
webpackSchema
2965+
);
29522966
});

0 commit comments

Comments
 (0)
Please sign in to comment.