This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Enforces schema validation for config BREAKING CHANGE: Enforces schema validation ( invalid configuration will throw )
- Loading branch information
1 parent
4525107
commit 091eded
Showing
9 changed files
with
851 additions
and
514 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"debug": { | ||
"type": "boolean" | ||
}, | ||
"compact": { | ||
"type": "boolean" | ||
}, | ||
"autoWrap": { | ||
"type": "boolean" | ||
}, | ||
"esModules": { | ||
"type": "boolean" | ||
}, | ||
"coverageVariable": { | ||
"type": "string" | ||
}, | ||
"preserveComments": { | ||
"type": "boolean" | ||
}, | ||
"produceSourceMap": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import loader from '../src'; | ||
|
||
describe('Errors', () => { | ||
test('Options Validation Error', () => { | ||
const err = () => loader.call({ query: { debug: 'foo' } }); | ||
|
||
expect(err).toThrow(); | ||
expect(err).toThrowErrorMatchingSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Errors Options Validation Error 1`] = ` | ||
"Validation Error | ||
Istanbul Instrumenter Loader Invalid Options | ||
options.debug should be boolean | ||
" | ||
`; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
module.exports = class Foo { | ||
|
||
bar() { | ||
return !!this; | ||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters