2022-08-10 07:45:14 +00:00
|
|
|
describe 'raw loader', ->
|
|
|
|
before_each -> export loader = require 'glass.raw'
|
|
|
|
it 'loads files as plain text', ->
|
2024-08-20 13:18:03 +00:00
|
|
|
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', ->
|
2024-08-20 13:18:03 +00:00
|
|
|
success, result = loader 'spec/fixtures/test'
|
|
|
|
assert.true success
|
|
|
|
assert.same { foo: 'bar', tab: {} }, result
|