Skip to content

Commit

Permalink
test(node4): disable coffeescript related tests when testing on node4
Browse files Browse the repository at this point in the history
in stead of running no tests at all
sverweij committed Dec 6, 2017
1 parent 52c8c24 commit a8d6982
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ test_async_node_4:
- npm install
- npm run lint
- npm run depcruise
# - npm run test:cover - coffeescript doesn't support node 4 anymore
- npm run test:cover-node4 - coffeescript doesn't support node 4 anymore
# - npm run nsp - nsp is not supported on node 4 anymore
except:
- tags
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
"preversion": "test `git branch | grep \"^* [a-zA-Z]\" | cut -c 3-` = 'master'",
"test": "mocha --bail -R dot test/*/*.spec.js test/*/*/*.spec.js",
"test:cover": "istanbul cover node_modules/mocha/bin/_mocha -- test/*/*.spec.js test/*/*/*.spec.js",
"test:cover-node4": "istanbul cover node_modules/mocha/bin/_mocha -- --invert --fgrep not-testable-in-node4 test/*/*.spec.js test/*/*/*.spec.js",
"test:long": "mocha test/*/*.spec.js test/*/*/*.spec.js",
"test:watch": "mocha --watch --watch-extensions=json --reporter=min test/*/*.spec.js"
},
2 changes: 1 addition & 1 deletion test/extract/extract.spec.js
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ describe('AMD - with bangs', () => {
});

describe('TypeScript - ', () => tsFixtures.forEach(runFixture));
describe('CoffeeScript - ', () => coffeeFixtures.forEach(runFixture));
describe('CoffeeScript - (not-testable-in-node4)', () => coffeeFixtures.forEach(runFixture));

describe('Error scenarios - ', () => {
it('Does not raise an exception on syntax errors (because we\'re on the loose parser)', () => {
6 changes: 3 additions & 3 deletions test/extract/gatherInitialSources.spec.js
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ describe("gatherInitial", () => {
);
});

it("expands and concats the scannable files in two folders", () => {
it("expands and concats the scannable files in two folders (not-testable-in-node4)", () => {
expect(
gather([
"test/extract/fixtures/ts",
@@ -64,7 +64,7 @@ describe("gatherInitial", () => {
);
});

it("expands and concats the scannable files in two folders + a separate file", () => {
it("expands and concats the scannable files in two folders + a separate file (not-testable-in-node4)", () => {
expect(
gather([
"test/extract/fixtures/ts",
@@ -88,7 +88,7 @@ describe("gatherInitial", () => {
);
});

it("filters the 'excluded' pattern from the collection", () => {
it("filters the 'excluded' pattern from the collection (not-testable-in-node4)", () => {
expect(
gather([
"test/extract/fixtures/ts",
2 changes: 1 addition & 1 deletion test/extract/index.spec.js
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ describe('Deprecation - ', () => deprecationFixtures.forEach(runRecursiveFixture
describe('Bundled - ', () => bundledFixtures.forEach(runRecursiveFixture));
describe('AMD recursive - ', () => amdRecursiveFixtures.forEach(runRecursiveFixture));
describe('TypeScript recursive - ', () => tsRecursiveFixtures.forEach(runRecursiveFixture));
describe('CoffeeScript recursive - ', () => coffeeRecursiveFixtures.forEach(runRecursiveFixture));
describe('CoffeeScript recursive - (not-testable-in-node4)', () => coffeeRecursiveFixtures.forEach(runRecursiveFixture));

describe('Max depth', () => {
it('returns the complete graph when max-depth is not specified', () => {
2 changes: 1 addition & 1 deletion test/extract/transpile/coffeeWrap.spec.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const expect = require("chai").expect;
const wrap = require("../../../src/extract/transpile/coffeeWrap")();
const litWrap = require("../../../src/extract/transpile/coffeeWrap")(true);

describe("coffeescript transpiler", () => {
describe("coffeescript transpiler (not-testable-in-node4)", () => {
it("tells the coffeescript transpiler is available", () => {
expect(
wrap.isAvailable()
4 changes: 2 additions & 2 deletions test/extract/transpile/meta.spec.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const meta = require("../../../src/extract/transpile/meta");
const jsWrap = require("../../../src/extract/transpile/javaScriptWrap");
const lsWrap = require("../../../src/extract/transpile/liveScriptWrap");

describe("transpiler meta", () => {
describe("transpiler meta (not-testable-in-node4)", () => {
it("tells which extensions can be scanned", () => {
expect(
meta.scannableExtensions
@@ -26,7 +26,7 @@ describe("transpiler meta", () => {
).to.deep.equal(lsWrap);
});

it("returns me the available transpilers", () => {
it("returns me the available transpilers (not-testable-in-node4)", () => {
expect(
meta.getAvailableTranspilers()
).to.deep.equal([{

0 comments on commit a8d6982

Please sign in to comment.