File tree 5 files changed +48
-2
lines changed
5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ language : node_js
2
+ node_js :
3
+ - " 8"
4
+ script : jasmine
Original file line number Diff line number Diff line change 1
1
# Asset Fingerprint Webpack Rails
2
2
A webpack plugin to fingerprint your JS for consumption by Rails
3
3
4
+ [ ![ Build Status] ( https://travis-ci.org/coderbydesign/asset-fingerprint-webpack-rails.svg?branch=master )] ( https://travis-ci.org/coderbydesign/asset-fingerprint-webpack-rails )
5
+
4
6
## Install
5
7
```
6
8
npm install asset-fingerprint-webpack-rails --save-dev
Original file line number Diff line number Diff line change 4
4
"description" : " A webpack plugin to fingerprint your JS for consumption by Rails" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
- "test" : " echo \" Error: no test specified \" && exit 1 "
7
+ "test" : " jasmine "
8
8
},
9
9
"repository" : {
10
10
"type" : " git" ,
22
22
"bugs" : {
23
23
"url" : " https://github.com/coderbydesign/asset-fingerprint-webpack-rails/issues"
24
24
},
25
- "homepage" : " https://github.com/coderbydesign/asset-fingerprint-webpack-rails#readme"
25
+ "homepage" : " https://github.com/coderbydesign/asset-fingerprint-webpack-rails#readme" ,
26
+ "devDependencies" : {
27
+ "jasmine" : " ^2.8.0"
28
+ }
26
29
}
Original file line number Diff line number Diff line change
1
+ describe ( "AssetFingerprint" , function ( ) {
2
+ var AssetFingerprint = require ( '../index' ) ;
3
+ var fingerprint ;
4
+
5
+ describe ( "initialization" , function ( ) {
6
+ it ( "should default needsFingerprint = true when no args" , function ( ) {
7
+ fingerprint = new AssetFingerprint ( ) ;
8
+ expect ( fingerprint . needsFingerprint ) . toBeTruthy ( ) ;
9
+ } ) ;
10
+
11
+ it ( "should accept true" , function ( ) {
12
+ fingerprint = new AssetFingerprint ( true ) ;
13
+ expect ( fingerprint . needsFingerprint ) . toBeTruthy ( ) ;
14
+ } ) ;
15
+
16
+ it ( "should accept false" , function ( ) {
17
+ fingerprint = new AssetFingerprint ( false ) ;
18
+ expect ( fingerprint . needsFingerprint ) . toBeFalsy ( ) ;
19
+ } ) ;
20
+
21
+ it ( "should accept null" , function ( ) {
22
+ fingerprint = new AssetFingerprint ( null ) ;
23
+ expect ( fingerprint . needsFingerprint ) . toBeFalsy ( ) ;
24
+ } ) ;
25
+ } ) ;
26
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "spec_dir" : " spec" ,
3
+ "spec_files" : [
4
+ " **/*[sS]pec.js"
5
+ ],
6
+ "helpers" : [
7
+ " helpers/**/*.js"
8
+ ],
9
+ "stopSpecOnExpectationFailure" : false ,
10
+ "random" : false
11
+ }
You can’t perform that action at this time.
0 commit comments