![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Test framework to light up the world.
$ npm install torchjs [-g]
$ torch test/main
$ torch --renderer test/renderer
$ torch --interative test/renderer
watching source files
$ torch --interactive --watch test/renderer
$ torch --coverage test/main && torch-coverage
$ torch --coverage test/main && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
interactive mode
$ torch --interactive --watch --source-pattern src/**/*.js test/renderer
code coverage
$ torch --coverage --source-pattern src/**/*.js test/main && torch-coverage
$ torch --help
Usage: torch [options]
Options:
-h, --help output usage information
-V, --version output the version number
-C, --no-colors force disabling of colors
-O, --reporter-options <k=v,k2=v2,...> reporter-specific options
-R, --reporter <name> specify the reporter to use
-S, --sort sort test files
-b, --bail bail after first test failure
-g, --grep <pattern> only run tests matching <pattern>
-f, --fgrep <string> only run tests containing <string>
-i, --invert inverts --grep and --fgrep matches
-r, --require <name> require the given module
-s, --slow <ms> "slow" test threshold in milliseconds [75]
-t, --timeout <ms> set test-case timeout in milliseconds [2000]
-u, --ui <name> specify user-interface (bdd|tdd|exports)
--check-leaks check for global variable leaks
--compile compile with babel
--compile-opts <path> path of compile options
--compilers <ext>:<module>,... use the given module(s) to compile files
--coverage report coverage
--debug enable Electron debugger on port [5858]; for --renderer tests show window and dev-tools
--debug-brk like --debug but pauses the script on the first line
--globals <names> allow the given comma-delimited global [names]
--inline-diffs display actual/expected differences inline within each string
--interactive run tests in renderer process in a visible window that can be reloaded to re-run tests
--interfaces display available interfaces
--no-timeouts disables timeouts
--notify-on-fail notify on failures
--notify-on-success notify on success
--opts <path> specify opts path
--preload <name> preload the given script in renderer process
--recursive include sub directories
--renderer run tests in renderer process
--require-main <name> load the given script in main process before executing tests
--source-pattern <sources> glob pattern of source files
--watch watching source file changes
--watch-aggregate-timeout delay time for re-run test cases after files changed
experimental
specify a js file providing compile options. default path is ${process.cwd()}/.torch.compile.opts.js
module.exports = {
babelrc: { // babelrc
presets: [
'es2015',
'stage-0'
],
sourceMaps: 'inline'
},
extensions: ['.es6', '.es', '.jsx', '.js'],
include: [ // glob expressions to detect files to include
'index.js',
'lib/**/*.js',
'src/**/*.js'
],
exclude: [ // glob expressions to detect files to exclude
'bower_components/**',
'node_modules/**'
]
}
Your .travis.yml will need two extra lines of configuration to run this headless on Travis:
before_script:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
The original idea and most of the code are stolen from electron-mocha, actually you can say that torch
is created by adding features onto electron-mocha
.
The MIT License (MIT)
FAQs
test framework to light up the world
The npm package torchjs receives a total of 34 weekly downloads. As such, torchjs popularity was classified as not popular.
We found that torchjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.