INTO-CPS-Association / DTaaS

:factory: :left_right_arrow: :busts_in_silhouette: Digital Twin as a Service
https://into-cps-association.github.io/DTaaS/
Other
116 stars 57 forks source link

[BUG] Port runner tests to Windows #1038

Open prasadtalasila opened 3 weeks ago

prasadtalasila commented 3 weeks ago

Describe the bug

The runner tests are failing on Windows OS when tested on github actions

To Reproduce

Steps to reproduce the behavior:

  1. Go to './github/workflows/runner.yml'
  2. Replace line-18 (runs-on: ubuntu-latest) with lines-18 to 21 of lib-ms.yml
    strategy:
      matrix:
        os: [windows-latest, ubuntu-latest]
    runs-on: ${{ matrix.os }}
  3. Check the Github actions of runner
  4. See error for windows-latest

    FAIL test/unit/util.spec.ts
    Check utils library
    × Should correctly resolve absolute path (6 ms)
    
    ● Check utils library › Should correctly resolve absolute path
    
    expect(received).toEqual(expected) // deep equality
    
    Expected: "C:Usersdtaas"
    Received: "C:\\Usersdtaas"
    
       8 |       // prettier-ignore
       9 |       // eslint-disable-next-line no-useless-escape
    > 10 |       expect(resolveFile('C:\Users\dtaas')).toEqual('C:\Users\dtaas');
         |                                             ^
      11 |     } else {
      12 |       expect(resolveFile('/opt/dtaas')).toEqual('/opt/dtaas');
      13 |     }
    
      at Object.<anonymous> (test/unit/util.spec.ts:10:45)

Expected behavior

Github action is successful for windows as well.