Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for source maps in generated tests #336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions generators/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@types/glob": "^7.2.0",
"@types/mocha": "^9.1.0",
"@types/node": "14.x",
"@types/source-map-support": "^0.5.4",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"eslint": "^8.9.0",
Expand All @@ -20,6 +21,7 @@
"concurrently": "^5.3.0",
"css-loader": "^4.2.0",
"fork-ts-checker-webpack-plugin": "^5.0.14",
"source-map-support": "^0.5.21",
"style-loader": "^1.2.1",
"ts-loader": "^9.2.6",
"vscode-dts": "^0.3.3",
Expand Down
2 changes: 2 additions & 0 deletions generators/app/templates/ext-command-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
<%- dep("@types/glob") %>,
<%- dep("@types/mocha") %>,
<%- dep("@types/node") %>,
<%- dep("@types/source-map-support") %>,
<%- dep("@typescript-eslint/eslint-plugin") %>,
<%- dep("@typescript-eslint/parser") %>,
<%- dep("eslint") %>,
<%- dep("glob") %>,
<%- dep("mocha") %>,
<%- dep("source-map-support") %>,
<%- dep("typescript") %>,
<%- dep("@vscode/test-electron") %><% if (insiders) { %>,
<%- dep("vscode-dts") %><% } %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
import * as sm from 'source-map-support';

export function run(): Promise<void> {
// Install support for source map files in stack traces.
sm.install();

// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
<%- dep("@types/glob") %>,
<%- dep("@types/mocha") %>,
<%- dep("@types/node") %>,
<%- dep("@types/source-map-support") %>,
<%- dep("@typescript-eslint/eslint-plugin") %>,
<%- dep("@typescript-eslint/parser") %>,
<%- dep("eslint") %>,
<%- dep("glob") %>,
<%- dep("mocha") %>,
<%- dep("source-map-support") %>,
<%- dep("typescript") %>,
<%- dep("ts-loader") %>,
<%- dep("webpack") %>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
import * as sm from 'source-map-support';

export function run(): Promise<void> {
// Install support for source map files in stack traces.
sm.install();

// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
Expand Down