2
2
3
3
var assert = require ( 'ember-cli/tests/helpers/assert' ) ;
4
4
5
- describe ( 'the index -hash tag' , function ( ) {
5
+ describe ( 'the file -hash tag' , function ( ) {
6
6
var Tag ;
7
7
8
8
before ( function ( ) {
9
- Tag = require ( '../../../../lib/tags/index -hash' ) ;
9
+ Tag = require ( '../../../../lib/tags/file -hash' ) ;
10
10
} ) ;
11
11
12
12
describe ( '#generate' , function ( ) {
13
13
it ( 'generates a hash of the supplied index file' , function ( ) {
14
14
var subject = new Tag ( {
15
15
context : {
16
- distDir : process . cwd ( ) + '/ tests/fixtures',
16
+ distDir : ' tests/fixtures',
17
17
distFiles : [ 'index.html' ] ,
18
18
} ,
19
19
config : {
@@ -30,7 +30,7 @@ describe('the index-hash tag', function() {
30
30
it ( 'rejects when the filePattern doesn\'t exist in distFiles' , function ( ) {
31
31
var subject = new Tag ( {
32
32
context : {
33
- distDir : process . cwd ( ) + '/ tests/fixtures',
33
+ distDir : ' tests/fixtures',
34
34
distFiles : [ 'index.html' ]
35
35
} ,
36
36
config : {
@@ -40,14 +40,14 @@ describe('the index-hash tag', function() {
40
40
41
41
return assert . isRejected ( subject . generate ( ) )
42
42
. then ( function ( error ) {
43
- assert . equal ( error , '`some-file-that-does-not-exist` does not exist in distDir' ) ;
43
+ assert . equal ( error , '`some-file-that-does-not-exist` does not exist in distDir `tests/fixtures` ' ) ;
44
44
} ) ;
45
45
} ) ;
46
46
47
47
it ( 'rejects when the file doesn\'t exist' , function ( ) {
48
48
var subject = new Tag ( {
49
49
context : {
50
- distDir : process . cwd ( ) + '/ tests/fixtures',
50
+ distDir : ' tests/fixtures',
51
51
distFiles : [ 'index.xxx' ]
52
52
} ,
53
53
config : {
0 commit comments