diff --git a/src/options.json b/src/options.json index 12a19c0..a3e978c 100644 --- a/src/options.json +++ b/src/options.json @@ -1,9 +1,7 @@ { "type": "object", "properties": { - "name": { - "type": "string" - }, + "name": {}, "regExp": {}, "context": { "type": "string" diff --git a/test/Errors.test.js b/test/Errors.test.js index 4209890..507964d 100644 --- a/test/Errors.test.js +++ b/test/Errors.test.js @@ -2,7 +2,10 @@ import loader from '../src'; describe('Errors', () => { test('Validation Error', () => { - const err = () => loader.call({ query: { name: 1 }, emitFile: true }); + const err = () => loader.call({ + query: { useRelativePath: 1 }, + emitFile: true, + }); expect(err).toThrow(); expect(err).toThrowErrorMatchingSnapshot(); diff --git a/test/__snapshots__/Errors.test.js.snap b/test/__snapshots__/Errors.test.js.snap index ebe8127..f8a72fc 100644 --- a/test/__snapshots__/Errors.test.js.snap +++ b/test/__snapshots__/Errors.test.js.snap @@ -11,6 +11,6 @@ exports[`Errors Validation Error 1`] = ` File Loader Invalid Options -options.name should be string +options.useRelativePath should be boolean " `;