Skip to content

Commit

Permalink
Update prettier to version 1.8.1
Browse files Browse the repository at this point in the history
Closes #171
  • Loading branch information
greenkeeper[bot] authored and RyanZim committed Nov 7, 2017
1 parent de0c81f commit c3131b6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"nyc": "^11.0.2",
"per-env": "^1.0.2",
"postcss-import": "^11.0.0",
"prettier": "1.7.4",
"prettier": "1.8.1",
"standard": "^10.0.2",
"sugarss": "^1.0.0",
"uuid": "^3.0.1"
Expand Down
35 changes: 15 additions & 20 deletions test/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,22 @@ test.failing('invalid --config', t => {
})

test('PluginError', t => {
return cli([
'test/fixtures/a.css',
'-u',
'postcss-plugin',
'-o',
tmp()
]).then(({ err, code }) => {
t.is(code, 1, 'expected non-zero error code')
t.regex(err.toString(), /Plugin Error: Cannot find module 'postcss-plugin'/)
})
return cli(['test/fixtures/a.css', '-u', 'postcss-plugin', '-o', tmp()]).then(
({ err, code }) => {
t.is(code, 1, 'expected non-zero error code')
t.regex(
err.toString(),
/Plugin Error: Cannot find module 'postcss-plugin'/
)
}
)
})

test('CssSyntaxError', t => {
return cli([
'test/fixtures/a.css',
'-p',
'sugarss',
'-o',
tmp()
]).then(({ err, code }) => {
t.is(code, 1, 'expected non-zero error code')
t.regex(err.toString(), /\[1:4] Unnecessary curly bracket/)
})
return cli(['test/fixtures/a.css', '-p', 'sugarss', '-o', tmp()]).then(
({ err, code }) => {
t.is(code, 1, 'expected non-zero error code')
t.regex(err.toString(), /\[1:4] Unnecessary curly bracket/)
}
)
})
21 changes: 9 additions & 12 deletions test/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ test.cb.skip('--watch works', t => {

// Helper functions:
function isEqual(p, expected) {
return Promise.all([
read(path.join(dir, p)),
read(expected)
]).then(([a, e]) => t.is(a, e))
return Promise.all([read(path.join(dir, p)), read(expected)]).then(
([a, e]) => t.is(a, e)
)
}

function done(err) {
Expand Down Expand Up @@ -139,10 +138,9 @@ test.cb.skip('--watch postcss.config.js', t => {

// Helper functions:
function isEqual(p, expected) {
return Promise.all([
read(path.join(dir, p)),
read(expected)
]).then(([a, e]) => t.is(a, e))
return Promise.all([read(path.join(dir, p)), read(expected)]).then(
([a, e]) => t.is(a, e)
)
}

function done(err) {
Expand Down Expand Up @@ -217,10 +215,9 @@ test.cb.skip('--watch dependencies', t => {

// Helper functions:
function isEqual(p, expected) {
return Promise.all([
read(path.join(dir, p)),
read(expected)
]).then(([a, e]) => t.is(a, e))
return Promise.all([read(path.join(dir, p)), read(expected)]).then(
([a, e]) => t.is(a, e)
)
}

function done(err) {
Expand Down

0 comments on commit c3131b6

Please sign in to comment.