Giter Club home page Giter Club logo

Comments (7)

stephenplusplus avatar stephenplusplus commented on August 15, 2024

Alternatively, it could be set up as a separate step of the CircleCI workflow.

from nodejs-storage.

jmdobry avatar jmdobry commented on August 15, 2024

npm test only runs unit tests right? If there are unit tests for the samples, then yes those should be included. Otherwise the samples' system tests should be executed on every PR and push to GitHub, using something like: #38 (comment)

from nodejs-storage.

stephenplusplus avatar stephenplusplus commented on August 15, 2024

What is the right way to only run sample unit tests from the npm test command? And will this change belong in the generator?

from nodejs-storage.

jmdobry avatar jmdobry commented on August 15, 2024

We typically do it as follows:

  • npm run unit-test - Runs the unit tests
  • npm run system-test - Runs the system tests
  • npm test - Runs both the unit tests and the system tests

If there is no unit-test script in the samples' package.json, then there are no unit tests.

from nodejs-storage.

stephenplusplus avatar stephenplusplus commented on August 15, 2024

Thanks. And the generator stays out of rootDir/package.json and we should write these ourselves? I know we call through to repo-tools in some places. Is there room to integrate with it for this task?

Additionally, I think unit-test should always exist, so we can run it without npm errors. Seeing "0/0 tests passed" is acceptable.

from nodejs-storage.

jmdobry avatar jmdobry commented on August 15, 2024

These scripts would be defined in samples/package.json, which is mostly copied over from nodejs-docs-samples. If there aren't unit tests, we could have: "unit-test": "node -e \"console.log('No tests')\"", which is cross platform.

from nodejs-storage.

stephenplusplus avatar stephenplusplus commented on August 15, 2024

It seems that whatever we have now is working.

from nodejs-storage.

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.