Skip to content
Myr

spec.plugins.js

This file

Path

spec/spec.plugins.js

30 lines · 660 bytes · JavaScript

Last changed by

CSSVariables -> CSSColors examplevisionmediabefore adoption5c7341c

History of this file

Take it

Started Pluginvisionmediabefore adoption8158a3d

line 1why, one step back
1

CSSVariables -> CSSColors examplevisionmediabefore adoption5c7341c

line 2why, one step back
2CSSColors = Plugin.extend({

Started Pluginvisionmediabefore adoption8158a3d

lines 3–14why, one step back
3 on: {
4 response: function(e) {5 if (e.response.headers['content-type'] == mime('css'))6 e.response.body = e.response.body.replace('black', '#000')7 }8 }9})1011describe 'Express'12 describe 'use()'13 before_each14 reset()

CSSVariables -> CSSColors examplevisionmediabefore adoption5c7341c

line 15why, one step back
15 use(CSSColors)

Started Pluginvisionmediabefore adoption8158a3d

lines 16–30why, one step back
16 end
17 18 describe 'events'19 describe 'onResponse'20 it 'should be triggered before headers and body are sent'21 get('/style.css', function(){22 contentType('css')23 return 'body { color: black; }'24 })25 get('/style.css').body.should.eql 'body { color: #000; }'26 end27 end28 end29 end30end