Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 949 Bytes
process.env.NODE_ENV = 'production'
request = require 'request'
app = require('connect').createServer()
assets = require('../lib/assets.js')
app.use assets src: '', jsCompilers:
match: /\.js$/
compileSync: (sourcePath, source) ->
require('coffee-script').compile source, filename: sourcePath
exports['options.src can be a URL'] = (test) ->
jsTag = "<script src=''></script>"
test.equals js('jquery.min.js'), jsTag
exports['If options.src is a URL, other URLs are still allowed'] = (test) ->
jsTag = "<script src='//'></script>"
test.equals js('//'), jsTag
exports['jsCompilers can be passed as an option'] = (test) ->
test.equals "function", typeof assets.jsCompilers.iced.compileSync
Jump to Line
Something went wrong with that request. Please try again.