Skip to content

Commit 91bd131

Browse files
guybedfordMoOx
authored andcommitted
fix tests, update ava (#230)
1 parent 58ae154 commit 91bd131

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function parseStyles(
164164
var statements = parseStatements(result, styles)
165165

166166
return Promise.all(statements.map(function(stmt) {
167-
stmt.media = joinMedia(media, stmt.media)
167+
stmt.media = joinMedia(media, stmt.media || [])
168168

169169
// skip protocol base uri (protocol://url) or protocol-relative
170170
if (stmt.type !== "import" || /^(?:[a-z]+:)?\/\//i.test(stmt.uri)) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"resolve": "^1.1.7"
2727
},
2828
"devDependencies": {
29-
"ava": "^0.11.0",
29+
"ava": "^0.16.0",
3030
"eslint": "^1.10.3",
3131
"eslint-config-i-am-meticulous": "^2.0.0",
3232
"npmpub": "^3.0.1",

test/callback.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test("should have a callback that returns an object" +
1010
.use(atImport({
1111
path: "fixtures/imports",
1212
onImport: files => {
13-
t.same(
13+
t.deepEqual(
1414
files,
1515
[
1616
resolve("fixtures/media-import.css"),
@@ -42,7 +42,7 @@ test("should have a callback shortcut for webpack", t => {
4242
from: "fixtures/media-import.css",
4343
})
4444
.then(() => {
45-
t.same(
45+
t.deepEqual(
4646
files,
4747
[
4848
resolve("fixtures/media-import.css"),

test/plugins.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ test("should apply plugins to root", t => {
2828
],
2929
})
3030
.then(() => {
31-
t.same(atRules, [ "import" ])
32-
t.same(rules, [ "bar", "foo" ])
31+
t.deepEqual(atRules, [ "import" ])
32+
t.deepEqual(rules, [ "bar", "foo" ])
3333
})
3434
})
3535

0 commit comments

Comments
 (0)