diff --git a/lib/options.json b/lib/options.json index 26bd708b..dd5f23c0 100644 --- a/lib/options.json +++ b/lib/options.json @@ -20,10 +20,10 @@ "type": [ "string", "object" ] }, "syntax": { - "type": "string" + "type": [ "string", "object" ] }, "stringifier": { - "type": "string" + "type": [ "string", "object" ] }, "sourceMap": { "type": [ "string", "boolean" ] diff --git a/test/loader.test.js b/test/loader.test.js index f8bc11c7..57e8ffcd 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -5,7 +5,6 @@ const { loader } = require('./helpers/compilation') describe('Loader', () => { test('Default', () => { - const _ = /style\.(exec\.js|js)$/ const config = { loader: { options: { diff --git a/test/options/__snapshots__/parser.test.js.snap b/test/options/__snapshots__/parser.test.js.snap index 67b13b7b..a9786e06 100644 --- a/test/options/__snapshots__/parser.test.js.snap +++ b/test/options/__snapshots__/parser.test.js.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Options Parser - {Function} 1`] = `"module.exports = \\"a {\\\\n color: black\\\\n}\\\\n\\""`; +exports[`Options Parser - {Object} 1`] = `"module.exports = \\"a {\\\\n color: black\\\\n}\\\\n\\""`; exports[`Options Parser - {String} 1`] = `"module.exports = \\"a {\\\\n color: black\\\\n}\\\\n\\""`; diff --git a/test/options/__snapshots__/stringifier.test.js.snap b/test/options/__snapshots__/stringifier.test.js.snap index 33c5e7db..3491b37d 100644 --- a/test/options/__snapshots__/stringifier.test.js.snap +++ b/test/options/__snapshots__/stringifier.test.js.snap @@ -1,3 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Options Stringifier - {Object} 1`] = `"module.exports = \\"a color: black\\\\n\\""`; + exports[`Options Stringifier - {String} 1`] = `"module.exports = \\"a color: black\\\\n\\""`; diff --git a/test/options/__snapshots__/syntax.test.js.snap b/test/options/__snapshots__/syntax.test.js.snap index 4c811493..87e4d50c 100644 --- a/test/options/__snapshots__/syntax.test.js.snap +++ b/test/options/__snapshots__/syntax.test.js.snap @@ -1,3 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Options Syntax - {Object} 1`] = `"module.exports = \\"a\\\\n color: black\\\\n\\""`; + exports[`Options Syntax - {String} 1`] = `"module.exports = \\"a\\\\n color: black\\\\n\\""`; diff --git a/test/options/parser.test.js b/test/options/parser.test.js index 8d052c2a..7c4bde78 100644 --- a/test/options/parser.test.js +++ b/test/options/parser.test.js @@ -21,7 +21,7 @@ describe('Options', () => { }) }) - test('Parser - {Function}', () => { + test('Parser - {Object}', () => { const config = { loader: { options: { diff --git a/test/options/stringifier.test.js b/test/options/stringifier.test.js index 3b2188d7..f4f450be 100644 --- a/test/options/stringifier.test.js +++ b/test/options/stringifier.test.js @@ -20,8 +20,8 @@ describe('Options', () => { expect(src).toMatchSnapshot() }) }) - // TODO fix schema - test.skip('Stringifier - {Function}', () => { + + test('Stringifier - {Object}', () => { const config = { loader: { options: { diff --git a/test/options/syntax.test.js b/test/options/syntax.test.js index 94decbe0..597c58c5 100644 --- a/test/options/syntax.test.js +++ b/test/options/syntax.test.js @@ -20,8 +20,8 @@ describe('Options', () => { expect(src).toMatchSnapshot() }) }) - // TODO fix schema - test.skip('Syntax - {Function}', () => { + + test('Syntax - {Object}', () => { const config = { loader: { options: {