Skip to content

Commit

Permalink
converted to parallell testing, upgraded mocha
Browse files Browse the repository at this point in the history
using mocha parallel for testing

refactor tests
  • Loading branch information
gautamkrishnar committed Jan 9, 2024
1 parent 7783844 commit 89f333b
Show file tree
Hide file tree
Showing 33 changed files with 710 additions and 969 deletions.
16 changes: 8 additions & 8 deletions dist/blog-post-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6303,7 +6303,7 @@ var require_lib2 = __commonJS({
}
});

// node_modules/rss-parser/lib/utils.js
// node_modules/rss-parser/lib/testUtils.js
var require_utils = __commonJS({
"node_modules/rss-parser/lib/utils.js"(exports2, module2) {
var utils = module2.exports = {};
Expand Down Expand Up @@ -6740,7 +6740,7 @@ var require_rss_parser = __commonJS({
}
});

// node_modules/@actions/core/lib/utils.js
// node_modules/@actions/core/lib/testUtils.js
var require_utils2 = __commonJS({
"node_modules/@actions/core/lib/utils.js"(exports2) {
"use strict";
Expand Down Expand Up @@ -8235,7 +8235,7 @@ var require_auth = __commonJS({
}
});

// node_modules/@actions/core/lib/oidc-utils.js
// node_modules/@actions/core/lib/oidc-testUtils.js
var require_oidc_utils = __commonJS({
"node_modules/@actions/core/lib/oidc-utils.js"(exports2) {
"use strict";
Expand Down Expand Up @@ -8298,10 +8298,10 @@ var require_oidc_utils = __commonJS({
return __awaiter(this, void 0, void 0, function* () {
const httpclient = _OidcClient.createHttpClient();
const res = yield httpclient.getJson(id_token_url).catch((error) => {
throw new Error(`Failed to get ID Token.
throw new Error(`Failed to get ID Token.
Error Code : ${error.statusCode}
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
Expand Down Expand Up @@ -8627,7 +8627,7 @@ var require_summary = __commonJS({
}
});

// node_modules/@actions/core/lib/path-utils.js
// node_modules/@actions/core/lib/path-testUtils.js
var require_path_utils = __commonJS({
"node_modules/@actions/core/lib/path-utils.js"(exports2) {
"use strict";
Expand Down Expand Up @@ -9697,7 +9697,7 @@ var require_library = __commonJS({
}
});

// src/utils.js
// src/testUtils.js
var require_utils3 = __commonJS({
"src/utils.js"(exports2, module2) {
var { spawn } = require("child_process");
Expand Down
2 changes: 1 addition & 1 deletion local-run.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const process = require('process');
const path = require('path');
const fs = require('fs');
const {DEFAULT_TEST_ENV} = require('./test/default-env');
const {DEFAULT_TEST_ENV} = require('./test/testUtils/default-env');
// language=markdown
const template = `# Readme test
Post list example:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"scripts": {
"build": "esbuild ./src/blog-post-workflow.js --bundle --platform=node --outfile=dist/blog-post-workflow.js",
"lint": "jshint --exclude='node_modules/' *.js",
"start-server": "node test/test-server.js",
"start-server": "node test/testUtils/test-server.js",
"local-run-script": "node local-run.js",
"local-run": "start-server-and-test start-server http://localhost:8080 local-run-script",
"test-run": "mocha test/test.js",
"test-run": "mocha --parallel --jobs 100 test/**.js",
"test": "yarn run lint && start-server-and-test start-server http://localhost:8080 test-run",
"test-run-dist": "DIST=true mocha test/test.js",
"test-run-dist": "DIST=true mocha --parallel --jobs 100 test/**.js",
"test-dist": "yarn run lint && start-server-and-test start-server http://localhost:8080 test-run-dist"
},
"repository": {
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"devDependencies": {
"jshint": "^2.12.0",
"mocha": "^8.1.3",
"mocha": "^10.2.0",
"start-server-and-test": "^1.11.3"
}
}
Loading

0 comments on commit 89f333b

Please sign in to comment.