File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1919 },
2020 "peerDependencies" : {
2121 "espower-loader" : " ~0.7.0"
22+ },
23+ "devDependencies" : {
24+ "mocha" : " ^1.20.1"
2225 }
23- }
26+ }
Original file line number Diff line number Diff line change 1+ "use strict" ;
2+ var assert = require ( "assert" ) ;
3+ var path = require ( "path" ) ;
4+ var normalizeDir = require ( "../lib/normalize-dir" ) ;
5+ describe ( "normalize-dir" , function ( ) {
6+ context ( "When string is ended with slash" , function ( ) {
7+ var string = [ "path" , "to" , "file" ] . join ( path . sep ) + path . sep ;
8+ it ( "should return same string" , function ( ) {
9+ assert . equal ( normalizeDir ( string ) , string ) ;
10+ } ) ;
11+ } ) ;
12+ context ( "When string is ended without slash" , function ( ) {
13+ var string = [ "path" , "to" , "file" ] . join ( path . sep ) ;
14+ it ( "should append slash" , function ( ) {
15+ assert . equal ( normalizeDir ( string ) , string + path . sep ) ;
16+ } ) ;
17+ } ) ;
18+ } ) ;
You can’t perform that action at this time.
0 commit comments