diff --git a/packages/tools/devtools/devtools-view/src/test/DynamicComposedChart.test.tsx b/packages/tools/devtools/devtools-view/src/test/DynamicComposedChart.test.tsx index 1fad4421ab47..e65c60960407 100644 --- a/packages/tools/devtools/devtools-view/src/test/DynamicComposedChart.test.tsx +++ b/packages/tools/devtools/devtools-view/src/test/DynamicComposedChart.test.tsx @@ -75,7 +75,7 @@ describe("DynamicComposedChart component test", () => { test("renders without crashing with data", () => { render(); const dynamicComposedChartElement = screen.findByTestId("test-dynamic-composed-chart"); - expect(dynamicComposedChartElement).not.toBeNull(); + expect(dynamicComposedChartElement).toBeNull(); expect(dynamicComposedChartElement).toBeDefined(); }); diff --git a/tools/pipelines/templates/build-npm-client-package.yml b/tools/pipelines/templates/build-npm-client-package.yml index 57d1f7d2ed11..5f12890ef324 100644 --- a/tools/pipelines/templates/build-npm-client-package.yml +++ b/tools/pipelines/templates/build-npm-client-package.yml @@ -596,7 +596,7 @@ extends: # Set variable startTest if everything is good so far and we'll start running tests, # so that the steps to process/upload test coverage results only run if we got to the point of actually running tests. - script: | - echo "##vso[task.setvariable variable=startTest]true" + echo "##vso[task.setvariable variable=startTestCoverage]true" displayName: Start Test - ${{ each test in parameters.coverageTests }}: @@ -608,7 +608,7 @@ extends: - task: Npm@1 displayName: 'npm run test:copyresults' - condition: and(succeededOrFailed(), eq(variables['startTest'], 'true')) + condition: and(succeededOrFailed(), eq(variables['startTestCoverage'], 'true')) inputs: command: custom workingDir: '${{ parameters.buildDirectory }}' @@ -620,7 +620,7 @@ extends: # A quick fix to patch the file with sed. (See https://github.com/bcoe/c8/issues/302) - task: Bash@3 displayName: Check for nyc/report directory - condition: and(succeededOrFailed(), eq(variables['startTest'], 'true')) + condition: and(succeededOrFailed(), eq(variables['startTestCoverage'], 'true')) inputs: targetType: 'inline' workingDirectory: '${{ parameters.buildDirectory }}' @@ -761,6 +761,7 @@ extends: - task: Npm@1 displayName: 'npm run test:copyresults' + condition: and(succeededOrFailed(), eq(variables['startTest'], 'true')) inputs: command: custom workingDir: '${{ parameters.buildDirectory }}' diff --git a/tools/pipelines/templates/build-npm-package.yml b/tools/pipelines/templates/build-npm-package.yml index c308fe9dfc14..b1b3de34ef03 100644 --- a/tools/pipelines/templates/build-npm-package.yml +++ b/tools/pipelines/templates/build-npm-package.yml @@ -346,6 +346,7 @@ extends: # Set variable startTest if the build succeed so that we can run all the test tasks whether they are failed or not - script: | echo "##vso[task.setvariable variable=startTest]true" + echo "##vso[task.setvariable variable=startTestCoverage]true" displayName: Start Test - ${{ each taskTestStep in parameters.taskTest }}: diff --git a/tools/pipelines/templates/include-test-stability.yml b/tools/pipelines/templates/include-test-stability.yml index a75df4ce84ec..19ec479f2796 100644 --- a/tools/pipelines/templates/include-test-stability.yml +++ b/tools/pipelines/templates/include-test-stability.yml @@ -108,6 +108,7 @@ jobs: # Set variable startTest if the build succeed so that we can run all the test tasks whether they are failed or not - script: | echo "##vso[task.setvariable variable=startTest]true" + echo "##vso[task.setvariable variable=startTestCoverage]true" displayName: Start Test - ${{ each taskTestStep in parameters.taskTest }}: diff --git a/tools/pipelines/templates/include-test-task.yml b/tools/pipelines/templates/include-test-task.yml index c4a4aa64adec..0bc8d52a2a96 100644 --- a/tools/pipelines/templates/include-test-task.yml +++ b/tools/pipelines/templates/include-test-task.yml @@ -23,7 +23,7 @@ steps: command: 'custom' workingDir: ${{ parameters.buildDirectory }} customCommand: 'run ${{ parameters.taskTestStep }}:coverage' - condition: and(succeededOrFailed(), eq(variables['startTest'], 'true')) + condition: and(succeededOrFailed(), eq(variables['startTestCoverage'], 'true')) env: # Tests can use this environment variable to behave differently when running from a test branch ${{ if contains(parameters.taskTestStep, 'tinylicious') }}: