Skip to content

Commit 7b9f314

Browse files
committed
test: add dummy snapshot 📸
1 parent 7dbcf24 commit 7b9f314

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"index.js"
4242
],
4343
"peerDependencies": {
44-
"webpack": "^4.12.0"
44+
"webpack": "^4.0.0"
4545
},
4646
"dependencies": {
4747
"@webpack-contrib/schema-utils": "^1.0.0-beta.0",

‎src/index.js‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import { getOptions } from 'loader-utils';
2-
import validateOptions from '@webpack-contrib/schema-utils';
2+
import validate from '@webpack-contrib/schema-utils';
33

44
import schema from './options.json';
55

6-
export const raw = true;
6+
export const raw = false;
77

88
export default function loader(source) {
99
const { version, webpack } = this;
1010

1111
const options = getOptions(this) || {};
1212

13-
validateOptions(schema, options, 'Loader');
13+
validate({
14+
name: 'binaryen-loader',
15+
schema,
16+
target: options,
17+
});
1418

1519
const newSource = `
1620
/**
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Loader Defaults 1`] = `
4+
"
5+
/**
6+
* Loader API Version: 2
7+
* Is this in \\"webpack mode\\": true
8+
*/
9+
/**
10+
* Original Source From Loader
11+
*/
12+
// console.log('foo');
13+
"
14+
`;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Options name {Boolean} 1`] = `
4+
"
5+
/**
6+
* Loader API Version: 2
7+
* Is this in \\"webpack mode\\": true
8+
*/
9+
/**
10+
* Original Source From Loader
11+
*/
12+
// console.log('foo');
13+
"
14+
`;

0 commit comments

Comments
 (0)