This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var $ = require('cheerio');
6
6
var util = require ( './util' ) ;
7
7
8
8
var root = path . resolve ( __dirname , '..' ) ;
9
- var tests = path . resolve ( root , 'tests ' ) ;
9
+ var fixtures = path . resolve ( root , 'fixtures ' ) ;
10
10
11
11
var projectRoot = path . resolve ( __dirname , '../../..' ) ;
12
12
var build = path . resolve ( projectRoot , 'build' ) ;
@@ -23,7 +23,7 @@ function rewriteAngularSrc(src, query) {
23
23
}
24
24
25
25
function generateFixture ( test , query ) {
26
- var indexFile = path . resolve ( tests , test , 'index.html' ) ;
26
+ var indexFile = path . resolve ( fixtures , test , 'index.html' ) ;
27
27
var text = fs . readFileSync ( indexFile , 'utf8' ) ;
28
28
29
29
var $$ = $ . load ( text ) ;
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ module.exports = middlewareFactory;
9
9
function middlewareFactory ( base ) {
10
10
base = base || '/e2e' ;
11
11
while ( base . length && base [ base . length - 1 ] === '/' ) base = base . slice ( 0 , base . length - 1 ) ;
12
- var fixture_regexp = new RegExp ( '^' + base + '/tests /([a-zA-Z0-9_-]+)(/(index.html)?)?$' ) ;
13
- var static_regexp = new RegExp ( '^' + base + '/tests /([a-zA-Z0-9_-]+)(/.*)$' ) ;
12
+ var fixture_regexp = new RegExp ( '^' + base + '/fixtures /([a-zA-Z0-9_-]+)(/(index.html)?)?$' ) ;
13
+ var static_regexp = new RegExp ( '^' + base + '/fixtures /([a-zA-Z0-9_-]+)(/.*)$' ) ;
14
14
15
15
return function ( req , res , next ) {
16
16
var match ;
@@ -29,7 +29,7 @@ function middlewareFactory(base) {
29
29
return next ( e ) ;
30
30
}
31
31
} else {
32
- return next ( 'Test ' + match [ 1 ] + ' not found.' ) ;
32
+ return next ( 'Fixture ' + match [ 1 ] + ' not found.' ) ;
33
33
}
34
34
} else if ( ( match = static_regexp . exec ( basicUrl ) ) ) {
35
35
var rewritten = util . rewriteTestFile ( match [ 1 ] , match [ 2 ] ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ var path = require('path');
5
5
var url = require ( 'url' ) ;
6
6
7
7
var root = path . resolve ( __dirname , '..' ) ;
8
- var tests = path . resolve ( root , 'tests ' ) ;
8
+ var tests = path . resolve ( root , 'fixtures ' ) ;
9
9
10
10
function stat ( path ) {
11
11
try {
@@ -29,7 +29,7 @@ function rewriteTestFile(testname, testfile) {
29
29
testfile = testfile . slice ( i ) ;
30
30
var s = stat ( path . resolve ( tests , testname , testfile ) ) ;
31
31
if ( s && s . isFile ( ) || s . isDirectory ( ) ) {
32
- return [ '/test/e2e/tests ' , testname , testfile ] . join ( '/' ) ;
32
+ return [ '/test/e2e/fixtures ' , testname , testfile ] . join ( '/' ) ;
33
33
}
34
34
return false ;
35
35
}
You can’t perform that action at this time.
0 commit comments