UNPKG

763 BJavaScriptView Raw
1/**
2 * Test case for load.
3 * Runs with mocha.
4 */
5'use strict'
6
7const load = require('../lib/load.js')
8const co = require('co')
9const assert = require('assert')
10const coz = require('coz')
11
12describe('load', () => {
13 it('Render base css.', () => co(function * () {
14 let bud = load({
15 type: 'base'
16 }, '644', true)
17 assert.ok(bud)
18 assert.ok(bud.tmpl)
19 bud.mkdirp = true
20 bud.path = __dirname + '/../tmp/base.scss'
21 coz.render(bud)
22 }))
23
24 it('Render vendor css.', () => co(function * () {
25 let bud = load({
26 type: 'vendor'
27 }, '644', true)
28 assert.ok(bud)
29 assert.ok(bud.tmpl)
30 bud.mkdirp = true
31 bud.path = __dirname + '/../tmp/vendor.scss'
32 coz.render(bud)
33 }))
34})
35
36/* global describe, before, after, it */