diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed9050bcb5..d1a629c31c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,7 +136,7 @@ jobs: - name: Run Unit Tests (Electron) id: electron-unit-tests - run: DISPLAY=:10 ./scripts/test.sh --runGlob "**/sql/**/*.test.js" # {{SQL CARBON EDIT}} Run only our tests with coverage. Disable for now since it's currently broken --coverage + run: DISPLAY=:10 ./scripts/test.sh --runGlob "**/sql/**/*.test.js" --coverage - name: Run Extension Unit Tests (Electron) id: electron-extension-unit-tests diff --git a/build/azure-pipelines/darwin/sql-product-build-darwin.yml b/build/azure-pipelines/darwin/sql-product-build-darwin.yml index e1ebc012a6..6a3a4dc29f 100644 --- a/build/azure-pipelines/darwin/sql-product-build-darwin.yml +++ b/build/azure-pipelines/darwin/sql-product-build-darwin.yml @@ -106,7 +106,7 @@ steps: - script: | set -e - ./scripts/test.sh --build --tfs "Unit Tests" # Disable code coverage since it's currently broken --coverage + ./scripts/test.sh --build --tfs "Unit Tests" --coverage displayName: Run unit tests condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) diff --git a/build/azure-pipelines/linux/sql-product-build-linux.yml b/build/azure-pipelines/linux/sql-product-build-linux.yml index 0b75a9d225..662d6152f7 100644 --- a/build/azure-pipelines/linux/sql-product-build-linux.yml +++ b/build/azure-pipelines/linux/sql-product-build-linux.yml @@ -119,7 +119,7 @@ steps: - script: | set -e - DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests" # Disable code coverage since it's currently broken --coverage + DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests" --coverage displayName: Run unit tests (Electron) condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) diff --git a/build/lib/compilation.js b/build/lib/compilation.js index 585101a46b..1148ef423d 100644 --- a/build/lib/compilation.js +++ b/build/lib/compilation.js @@ -37,9 +37,10 @@ function createCompile(src, build, emitError) { const sourcemaps = require('gulp-sourcemaps'); const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json'); const overrideOptions = Object.assign(Object.assign({}, getTypeScriptCompilerOptions(src)), { inlineSources: Boolean(build) }); - if (!build) { - overrideOptions.inlineSourceMap = true; - } + // {{SQL CARBON EDIT}} Never inline source maps so that generating local coverage works + // if (!build) { + // // overrideOptions.inlineSourceMap = true; + // } const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err)); function pipeline(token) { const bom = require('gulp-bom'); diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index 66ca3c5e4f..2c9c70f83a 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -44,9 +44,10 @@ function createCompile(src: string, build: boolean, emitError?: boolean) { const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json'); const overrideOptions = { ...getTypeScriptCompilerOptions(src), inlineSources: Boolean(build) }; - if (!build) { - overrideOptions.inlineSourceMap = true; - } + // {{SQL CARBON EDIT}} Never inline source maps so that generating local coverage works + // if (!build) { + // // overrideOptions.inlineSourceMap = true; + // } const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err)); diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index 92409caef2..d2a7c6c575 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -964,7 +964,8 @@ export class EditorGroupView extends Themable implements IEditorGroupView { // Determine options const openEditorOptions: IEditorOpenOptions = { index: options ? options.index : undefined, - pinned: options?.sticky || !this.accessor.partOptions.enablePreview || editor.isDirty() || (options?.pinned ?? typeof options?.index === 'number' /* unless specified, prefer to pin when opening with index */) || (typeof options?.index === 'number' && this.model.isSticky(options.index)), + // {{SQL CARBON EDIT}} Refactor statement to not use ?? since that breaks code coverage on unit tests + pinned: options?.sticky || !this.accessor.partOptions.enablePreview || editor.isDirty() || (options?.pinned !== null ? options?.pinned : typeof options?.index === 'number' /* unless specified, prefer to pin when opening with index */) || (typeof options?.index === 'number' && this.model.isSticky(options.index)), sticky: options?.sticky || (typeof options?.index === 'number' && this.model.isSticky(options.index)), active: this.count === 0 || !options || !options.inactive }; diff --git a/test/unit/coverage.js b/test/unit/coverage.js index a12c0177b4..49a3eebd52 100644 --- a/test/unit/coverage.js +++ b/test/unit/coverage.js @@ -41,7 +41,7 @@ exports.createReport = function (isSingle) { Object.keys(transformed.data).forEach((file) => { const entry = transformed.data[file]; const fixedPath = fixPath(entry.path); - if (fixedPath.includes('\\vs\\') || fixedPath.includes('/vs/')) { return; } // {{SQL CARBON EDIT}} skip vscode files + if (fixedPath.includes(`/vs/`) || fixedPath.includes('\\vs\\') || path.basename(fixedPath) === 'marked.js') { return; } // {{SQL CARBON EDIT}} skip vscode files and imported marked.js entry.data.path = fixedPath; newData[fixedPath] = entry; });