Skip to content

Commit eaca2c7

Browse files
test: standardize
1 parent 0b36911 commit eaca2c7

25 files changed

+351
-104
lines changed

test/Errors.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict'
2+
3+
describe('Errors', () => {
4+
test('Validation Error', () => {
5+
const loader = require('../lib')
6+
7+
const error = () => loader.call({ query: { plugins: 1 } })
8+
9+
expect(error).toThrow()
10+
expect(error).toThrowErrorMatchingSnapshot()
11+
})
12+
})
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Errors Validation Error 1`] = `
4+
"PostHTML Loader Invalid Options
5+
6+
options.plugins should be array
7+
options.plugins should be object
8+
options.plugins should pass \\"instanceof\\" keyword validation
9+
options.plugins should match exactly one schema in oneOf
10+
"
11+
`;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Loader Defaults 1`] = `
4+
"export default \`<section>Hello</section>
5+
\`"
6+
`;

test/fixtures/basic/app.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/fixtures/basic/index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/fixtures/custom_parser/app.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/fixtures/custom_parser/index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/fixtures/fixture.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div>Hello</div>

test/fixtures/fixture.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import html from './fixture.html'

test/fixtures/locals/app.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)