-
-
Notifications
You must be signed in to change notification settings - Fork 211
test: refactor using .config.js
(JS) for test configs
#230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
file: 'config', | ||
options: { | ||
config: { | ||
path: 'test/fixtures/config/postcss.config.js', | ||
ctx: { plugin: false } | ||
} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
file: 'error', | ||
options: { | ||
parser: 'sugarss' | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
file: 'exec', | ||
options: { | ||
exec: true | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
file: 'export', | ||
options: { | ||
config: { | ||
path: 'test/fixtures/config/postcss.config.js' | ||
} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
file: 'jss', | ||
options: { | ||
parser: 'postcss-js' | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
file: 'map', | ||
options: { | ||
config: { | ||
path: 'test/fixtures' | ||
}, | ||
sourceMap: 'inline' | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
file: 'options', | ||
options: { | ||
parser: {}, | ||
syntax: [], | ||
plugins: {} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
file: 'parser', | ||
options: { | ||
parser: 'sugarss' | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
file: 'plugins', | ||
options: { | ||
plugins: [ | ||
require('../plugin')() | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
file: 'plugins.fn', | ||
options: { | ||
plugins: () => [ | ||
require('../plugin')() | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test('Plugins - {Function}', () => { | ||
const css = require('../fixtures/style.css') | ||
expect(css).toEqual('a { color: rgba(255, 0, 0, 1.0) }\n') | ||
}) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
file: 'sourceMap-inline', | ||
options: { | ||
config: { | ||
path: 'test/fixtures/config/postcss.config.js' | ||
}, | ||
sourceMap: 'inline' | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test('Source Maps - Inline', () => { | ||
const css = require('../fixtures/style.css') | ||
expect(css).toEqual('a { color: black }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFJLFlBQVksRUFBRSIsImZpbGUiOiJzdHlsZS5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJhIHsgY29sb3I6IGJsYWNrIH1cbiJdfQ== */') | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
file: 'sourceMap-true', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @michael-ciniawsky i think we late add |
||
options: { | ||
config: { | ||
path: 'test/fixtures/config/postcss.config.js' | ||
}, | ||
sourceMap: true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
test('Source Maps', () => { | ||
test('Source Maps - true', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. - true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
const css = require('../fixtures/style.css') | ||
expect(css).toEqual('a { color: black }\n') | ||
}) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
file: 'stringifier', | ||
options: { | ||
stringifier: 'sugarss' | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
file: 'syntax', | ||
options: { | ||
syntax: 'sugarss' | ||
} | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceMap-inline
=>map
( Referring to PostCSS{ map: 'inline'}
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-ciniawsky Will not it be a bit confused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah... 🙃 😛 I just don't like the
dash
style :D