Cli-microsoft365: Bug report: Failing test on Windows

Created on 25 Feb 2020  路  2Comments  路  Source: pnp/cli-microsoft365

Description

_spfx project externalize: covers all text report branches test fails_ on Windows, does not fail on Mac OS

Steps to reproduce

Follow path to awesome and run npm test

Expected result

All tests pass

Actual result

  7634 passing (18s)
  1 failing

  1) spfx project externalize
       covers all text report branches:

      AssertionError [ERR_ASSERTION]: 124 == 122
      + expected - actual

      -124
      +122

      at Context.<anonymous> (dist\o365\spfx\commands\project\project-externalize.spec.js:663:16)
      at processImmediate (internal/timers.js:439:21)

Environment

Windows 10, PowerShell, 2.7.0, Node v12.10.0

bug

Most helpful comment

@appieschot as this failing test is also present in #1544, lets close this and manage the work to fix the tests in one issue 馃憤馃徎

All 2 comments

As it fails on the assert.equal(emptyReport.length, 122); we could either add an or clause to check for 124 as well. Looks like a difference in how windows handles empty spaces/tabs vs how Mac/Linux handles them?

We also now have some failing tests on how slashes are handled (/ vs ) but will create a separate issue for that.

@appieschot as this failing test is also present in #1544, lets close this and manage the work to fix the tests in one issue 馃憤馃徎

Was this page helpful?
0 / 5 - 0 ratings