glass/spec/loaders_spec.moon

12 lines
403 B
Text
Raw Permalink Normal View History

2022-08-10 07:45:14 +00:00
describe 'raw loader', ->
before_each -> export loader = require 'glass.raw'
it 'loads files as plain text', ->
assert.same {true, 'plain text\n'}, {loader 'spec/fixtures/test'}
2022-08-10 07:45:14 +00:00
describe 'lua loader', ->
before_each -> export loader = require 'glass.lua'
it 'loads Lua files', ->
success, result = loader 'spec/fixtures/test'
assert.true success
assert.same { foo: 'bar', tab: {} }, result