mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
19 lines
516 B
CoffeeScript
19 lines
516 B
CoffeeScript
{less} = require('less')
|
|
|
|
describe "require", ->
|
|
describe "files with a `.less` extension", ->
|
|
it "parses valid files into css", ->
|
|
output = require(project.resolve("sample.less"))
|
|
expect(output).toBe """
|
|
#header {
|
|
color: #4d926f;
|
|
}
|
|
h2 {
|
|
color: #4d926f;
|
|
}
|
|
|
|
"""
|
|
|
|
it "throws an error when parsing invalid file", ->
|
|
functionWithError = (-> require(project.resolve("sample-with-error.less")))
|
|
expect(functionWithError).toThrow() |