node-jest/debian
openKylinBot a66fe7393b Import Debian changes 27.5.1~ds+~cs69.51.22-ok1
node-jest (27.5.1~ds+~cs69.51.22-ok1) yangtze; urgency=medium

  * Build for openKylin.
2022-07-16 13:02:46 +08:00
..
build_modules Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
nodejs Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
patches Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
source Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
tests Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
upstream Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
README.Debian Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
bcoe-rollup-config.js Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
changelog Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
clean Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
control Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
copyright Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
examples Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
gbp.conf Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
gitlab-ci.yml Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
jest.docs Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
jest.install Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
jest.links Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
jest.lintian-overrides Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
manpages Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
node-jest-debbundle.docs Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
node-jest-debbundle.install Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
node-jest-debbundle.lintian-overrides Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
node-jest-worker.docs Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
node-jest-worker.install Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
rules Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
watch Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00
yarn-workspaces.json Import Debian changes 27.5.1~ds+~cs69.51.22-ok1 2022-07-16 13:02:46 +08:00

README.Debian

# USING JEST IN DEBIAN PACKAGING

# Changes added to jest package in default configuration:

 * jest package excludes <rootdir>.pc/ directory to avoid problems when
   upstream tests are patched (default value of --modulePathIgnorePatterns)
 * jest package includes Debian nodejs directories
   (default values of --modulePaths)

# Usage notes:

 * when upstream installed snapshots in its test files, it may generate
   false-positive autopkgtest regressions (test succeeds but output changed).
   To avoid this, use the "-u" option: this updates snapshots and so avoid
   these kind of errors
 * always use the "--ci" option when jest is used in Debian packaging and/or
   autopkgtest. It prevents snapshot from being written
 * when your package contains component, it is recommended to set a path
   to jest to avoid launching component test that may be incompatible
   (component tests can be launched using
   debian/nodejs/<component>/test). Example:

     $ jest test/

 * pkg-js-autopkgtest
   * jest needs often babel configuration file. Since version 0.9.48,
     pkg-js-autopkgtest automatically installs .babelrc and babel.config.json
     in test directory (and installed package.json. If your package uses
     another file, set a debian/tests/pkg-js/files (see below)
   * jest tests often need sources files. Use debian/tests/pkg-js/files in
     this case.
   * debian/tests/pkg-js/files example (remember that when this file exists,
     only the mentioned files and package files are installed in test
     directory):

       babel.config.json
       src/
       test/

# Switching from ava to jest:

ava is not packaged. You can easily replace it by jest using jest-codemods.
Simply launch this and follow instructions:

    $ npx jest-codemods

Note that you will probably need a .babelrc or babel.config.json. Example:

    {
      "presets": [ "@babel/preset-env" ],
      "plugins": [ "@babel/plugin-transform-runtime" ]
    }