Skip to content

Commit da0dbf0

Browse files
committed
test syntax in bundle_tests/ files
1 parent 4cb058e commit da0dbf0

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

tasks/test_bundle.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ var path = require('path');
22
var exec = require('child_process').exec;
33

44
var glob = require('glob');
5+
56
var constants = require('./util/constants');
6-
var pathToBundleTests = path.join(constants.pathToJasmineTests, '..', 'bundle_tests');
7+
var pathToJasmineBundleTests= path.join(constants.pathToJasmineBundleTests);
78

89

9-
glob(pathToBundleTests + '/*.js', function(err, files) {
10+
glob(pathToJasmineBundleTests + '/*.js', function(err, files) {
1011
files.forEach(function(file) {
1112
var baseName = path.basename(file);
1213
var cmd = 'npm run citest-jasmine -- bundle_tests/' + baseName;

tasks/util/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module.exports = {
4848
pathToTestImagesDiffList: path.join(pathToBuild, 'list_of_incorrect_images.txt'),
4949

5050
pathToJasmineTests: path.join(pathToRoot, 'test/jasmine/tests'),
51+
pathToJasmineBundleTests: path.join(pathToRoot, 'test/jasmine/bundle_tests'),
5152

5253
uglifyOptions: {
5354
fromString: true,

test/syntax_test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ var glob = require('glob');
66

77
var constants = require('../tasks/util/constants');
88

9-
var focusGlobals = ['fdescribe', 'fit', 'xdescribe', 'xit'];
9+
var BLACK_LIST = ['fdescribe', 'fit', 'xdescribe', 'xit'];
1010
var logs = [];
1111

12+
var testGlob = path.join(constants.pathToJasmineTests, '**/*.js');
13+
var bundleTestGlob = path.join(constants.pathToJasmineBundleTests, '**/*.js');
1214

13-
glob(path.join(constants.pathToJasmineTests, '**/*.js'), function(err, files) {
15+
16+
glob('{' + testGlob + ',' + bundleTestGlob + '}', function(err, files) {
1417
files.forEach(function(file) {
1518
var code = fs.readFileSync(file, 'utf-8');
1619

1720
falafel(code, {locations: true}, function(node) {
18-
if(node.type === 'Identifier' && focusGlobals.indexOf(node.name) !== -1) {
21+
if(node.type === 'Identifier' && BLACK_LIST.indexOf(node.name) !== -1) {
1922
logs.push([
2023
path.basename(file),
2124
'[line ' + node.loc.start.line + '] :',

0 commit comments

Comments
 (0)