GithubHelp home page GithubHelp logo

Comments (2)

jeromesimeon avatar jeromesimeon commented on August 28, 2024

I have an initial PR for this in #161 but not sure how to test it. This is purely based on the corresponding fix that was done for accordproject/template-archive#401

@j4m3sb0mb Would you have a simple test package or example I could use to test that the fix works?

from markdown-transform.

jeromesimeon avatar jeromesimeon commented on August 28, 2024

Fix in #161 was tested with the following sample npm package:

test.zip

Seems to work fine. Before the fix:

bash-3.2$ npm run test:cov 
npm run test:cov 

> [email protected] test:cov /Users/jeromesimeon/tmp/test
> jest --timeOut=10000 --coverage

PASS lib/mylib.test.js
  acceptance
    ✓ translate (13ms)

�[999D------------------------------------------------------------------------------------------------|----------|----------|----------|----------|-------------------|
File                                                                                            |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
------------------------------------------------------------------------------------------------|----------|----------|----------|----------|-------------------|
All files                                                                                       |    39.37 |    34.85 |    48.78 |     39.2 |                   |
 Users/jeromesimeon/tmp/test/lib                                                                |      100 |      100 |      100 |      100 |                   |
  mylib.js                                                                                      |      100 |      100 |      100 |      100 |                   |
 home/travis/build/accordproject/markdown-transform/packages/markdown-common/src                |    37.14 |    34.85 |     47.5 |    36.93 |                   |
  CommonMarkTransformer.js                                                                      |     56.2 |    51.35 |       65 |    56.39 |... 49,350,352,355 |
  Stack.js                                                                                      |    86.67 |    88.89 |    85.71 |    86.67 |             72,89 |
  ToMarkdownStringVisitor.js                                                                    |     1.08 |        0 |        0 |     1.08 |... 39,240,242,244 |
 home/travis/build/accordproject/markdown-transform/packages/markdown-common/src/externalModels |      100 |      100 |      100 |      100 |                   |
  CommonMarkModel.js                                                                            |      100 |      100 |      100 |      100 |                   |
------------------------------------------------------------------------------------------------|----------|----------|----------|----------|-------------------|
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        1.236s
Ran all test suites.

After the fix:

bash-3.2$ npm run test:cov 
npm run test:cov 

> [email protected] test:cov /Users/jeromesimeon/tmp/test
> jest --timeOut=10000 --coverage

PASS lib/mylib.test.js
  acceptance
    ✓ translate (14ms)

�[999D----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |      100 |      100 |      100 |      100 |                   |
 mylib.js |      100 |      100 |      100 |      100 |                   |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        0.9s, estimated 1s
Ran all test suites.

from markdown-transform.

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.