Skip to content

Commit

Permalink
chore: update sass-loader plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
X authored Nov 19, 2020
1 parent cd8a593 commit b645f94
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions plugins/sass_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ Deno.test('project sass loader plugin', () => {
href: 'https://localhost/'
}
})
const { code, loader } = plugin.transform(
let ret = plugin.transform(
(new TextEncoder).encode('$someVar: 123px\n.some-selector\n width: 123px'),
'test.sass'
)
assertEquals(code, '.some-selector {\n width: 123px;\n}')
assertEquals(loader, 'css')
})
assertEquals(ret.code, '.some-selector {\n width: 123px;\n}')
ret = plugin({ indentType: 'tab', indentWidth: 2 }).transform(
(new TextEncoder).encode('$someVar: 123px\n.some-selector\n width: 123px'),
'test.sass'
)
assertEquals(ret.code, '.some-selector {\n\t\twidth: 123px;\n}')
})

0 comments on commit b645f94

Please sign in to comment.