Coder Social home page Coder Social logo

Failed tests about cram-js HOT 9 CLOSED

gmod avatar gmod commented on July 28, 2024
Failed tests

from cram-js.

Comments (9)

cmdcolin avatar cmdcolin commented on July 28, 2024 1

can confirm that booting up a windows VM from modern.ie (MSEdge on Win10) https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ and testing on that platform has the same errors posted by @0xorial

from cram-js.

cmdcolin avatar cmdcolin commented on July 28, 2024

Which tests fail? Can you paste a complete log files?

from cram-js.

0xorial avatar 0xorial commented on July 28, 2024
PS C:\Users\user\repos\cram-js> yarn run test
yarn run v1.22.17
$ jest





 PASS  test/binary-parser.test.ts
                                 


 PASS  test/crai.test.ts           
                                   

 PASS  test/util.test.ts           
                                   
 PASS  test/example-code.test.ts (5.614 s)
  ● Console

    console.log
      C:\Users\user\repos\cram-js

      at Object.<anonymous> (test/example-code.test.ts:4:9)

 PASS  test/retry.test.ts (5.711 s)     
 PASS  test/lossy-names.test.ts
 FAIL  test/parse.test.ts (5.812 s)       
  ● CRAM reader › can read a bigger cram file

    CRAM version 114 not supported

      90 |     const definition = cramFileDefinitionParser.parser.parse(headbytes).result
      91 |     if (definition.majorVersion !== 2 && definition.majorVersion !== 3) {
    > 92 |       throw new CramUnimplementedError(
         |             ^
      93 |         `CRAM version ${definition.majorVersion} not supported`,
      94 |       )
      95 |     }

      at CramFile.<anonymous> (src/cramFile/file.js:92:13)
      at fulfilled (src/cramFile/file.js:5:58)

  ● CRAM reader › can read an even bigger cram file

    CRAM version 114 not supported

      90 |     const definition = cramFileDefinitionParser.parser.parse(headbytes).result
      91 |     if (definition.majorVersion !== 2 && definition.majorVersion !== 3) {
    > 92 |       throw new CramUnimplementedError(
         |             ^
      93 |         `CRAM version ${definition.majorVersion} not supported`,
      at fulfilled (src/cramFile/file.js:5:58)

 FAIL  test/indexedfile.test.ts (13.768 s)
  ● .crai indexed cram file › can fetch some regions of tomato example data correctly

    invalid .crai index file

      107 |             // if there are other characters in the file besides
      108 |             // space and \r, something is wrong.
    > 109 |             throw new CramMalformedError('invalid .crai index file')
          |                   ^
      110 |           }
      111 |         }
      112 |

      at src/craiIndex.js:109:19

         |               ^
      84 |         `${this.file}: container header at ${position} indicates that the container has length ${header1.length}, which extends beyond the length of the file. Skipping this container.`,
      85 |       )
      86 |       return undefined

      at CramContainer.<anonymous> (src/cramFile/container/index.js:83:15)
      at fulfilled (src/cramFile/container/index.js:5:58)


Test Suites: 2 failed, 7 passed, 9 total
Tests:       3 failed, 259 passed, 262 total
Snapshots:   1 passed, 1 total
Time:        28.882 s
Ran all test suites.
error Command failed with exit code 1.

from cram-js.

cmdcolin avatar cmdcolin commented on July 28, 2024

odd! have not seen any failing tests like that before.

this happens with a clean repo e.g. just after cloning the repo, ran yarn, then yarn test?

the only difference i can see from my test environment is that you are using windows and i have linux but not sure why that would change anything

from cram-js.

rbuels avatar rbuels commented on July 28, 2024

is there any potential to get our CI on windows?

from cram-js.

cmdcolin avatar cmdcolin commented on July 28, 2024

might be able to do CI on windows. random note: wsl on windows works ok, it is just plain old windows that has the issue

from cram-js.

cmdcolin avatar cmdcolin commented on July 28, 2024

looks like the failed tests are three so-called 'extended' tests which reference test data that is not in the main repo using symlinks (see arrow icons here) https://github.com/GMOD/cram-js/tree/master/test/data/extended that are only valid on dev machines, they were only used during early library development i think

the reason these tests fail on windows is because git on windows clones the symlinks wrong by default, and then the logic in the tests for detecting the symlinks gets confused and thinks that they are valid, and then fails to interpret them

there are about 3 failed tests corresponding to the 3 extended tests

maybe we can probably remove the extended data tests or reduce them in size. alternatively, you can use wsl, as mentioned above, or

git clone -c core.symlinks=true https://github.com/GMOD/cram-js

This helps preserve the symlinks. Requires administrative console in windows

from cram-js.

cmdcolin avatar cmdcolin commented on July 28, 2024

should be able to just use normal clone and test now on master branch, the extended tests are removed now

from cram-js.

cmdcolin avatar cmdcolin commented on July 28, 2024

thanks for reporting :)

from cram-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.