Skip to content

Commit 371b516

Browse files
committed
only add generator tests if we have generators
1 parent 58d6fc7 commit 371b516

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/runner.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ var testFiles =[
253253
, '/test/functional/promises_cursor_tests.js'
254254
, '/test/functional/operation_promises_example_tests.js'
255255

256-
// Generator tests
257-
, '/test/functional/operation_generators_example_tests.js'
258-
259256
// Logging tests
260257
, '/test/functional/logger_tests.js'
261258

@@ -288,6 +285,13 @@ var testFiles =[
288285
, '/test/functional/authentication_tests.js'
289286
]
290287

288+
// Check if we support es6 generators
289+
try {
290+
eval("(function *(){})");
291+
// Generator tests
292+
testFiles.push('/test/functional/operation_generators_example_tests.js');
293+
} catch(err) {}
294+
291295
// Add all the tests to run
292296
testFiles.forEach(function(t) {
293297
if(t != "") runner.add(t);

0 commit comments

Comments
 (0)