FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(schema): allow to pass an `{Object}` (`options.syntax/options.stringifier`) by michael-ciniawsky · Pull Request #300 · webpack/postcss-loader · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (4) .json  (1) .snap  (3) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions lib/options.json
This file contains hidden or 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
Expand Up @@ -20,10 +20,10 @@
"type": [ "string", "object" ]
},
"syntax": {
"type": "string"
"type": [ "string", "object" ]
},
"stringifier": {
"type": "string"
"type": [ "string", "object" ]
},
"sourceMap": {
"type": [ "string", "boolean" ]
Expand Down
1 change: 0 additions & 1 deletion test/loader.test.js
This file contains hidden or 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
Expand Up @@ -5,7 +5,6 @@ const { loader } = require('./helpers/compilation')

describe('Loader', () => {
test('Default', () => {
const _ = /style\.(exec\.js|js)$/
const config = {
loader: {
options: {
Expand Down
2 changes: 1 addition & 1 deletion test/options/__snapshots__/parser.test.js.snap
This file contains hidden or 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,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\\""`;
2 changes: 2 additions & 0 deletions test/options/__snapshots__/stringifier.test.js.snap
This file contains hidden or 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,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\\""`;
2 changes: 2 additions & 0 deletions test/options/__snapshots__/syntax.test.js.snap
This file contains hidden or 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,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\\""`;
2 changes: 1 addition & 1 deletion test/options/parser.test.js
This file contains hidden or 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
Expand Up @@ -21,7 +21,7 @@ describe('Options', () => {
})
})

test('Parser - {Function}', () => {
test('Parser - {Object}', () => {
const config = {
loader: {
options: {
Expand Down
4 changes: 2 additions & 2 deletions test/options/stringifier.test.js
This file contains hidden or 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
Expand Up @@ -20,8 +20,8 @@ describe('Options', () => {
expect(src).toMatchSnapshot()
})
})
// TODO fix schema
test.skip('Stringifier - {Function}', () => {

test('Stringifier - {Object}', () => {
const config = {
loader: {
options: {
Expand Down
4 changes: 2 additions & 2 deletions test/options/syntax.test.js
This file contains hidden or 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
Expand Up @@ -20,8 +20,8 @@ describe('Options', () => {
expect(src).toMatchSnapshot()
})
})
// TODO fix schema
test.skip('Syntax - {Function}', () => {

test('Syntax - {Object}', () => {
const config = {
loader: {
options: {
Expand Down

Back | FazBrowse Home | New Git URL