Skip to content

Commit ed02857

Browse files
committed
Updated the README for 4.0
1 parent c682d32 commit ed02857

File tree

1 file changed

+19
-65
lines changed

1 file changed

+19
-65
lines changed

README.md

Lines changed: 19 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -14,90 +14,44 @@ This module allows you to run Jasmine specs for your Node.js code. The output wi
1414

1515
## Documentation
1616

17-
https://jasmine.github.io/edge/node.html
17+
https://jasmine.github.io/setup/nodejs.html
18+
19+
## Quick Start
20+
21+
Installation:
1822

19-
## Installation
2023
```sh
21-
# Local installation:
2224
npm install --save-dev jasmine
23-
24-
# Global installation
25-
npm install -g jasmine
2625
```
2726

28-
## Initializing
29-
30-
To initialize a project for Jasmine
31-
32-
`jasmine init`
33-
34-
To initialize a project for Jasmine when being installed locally
35-
36-
`node_modules/.bin/jasmine init`
37-
38-
or
27+
To initialize a project for Jasmine:
3928

40-
`npx jasmine init`
41-
42-
To seed your project with some examples
43-
44-
`jasmine examples`
45-
46-
## Usage
47-
48-
To run your test suite
49-
50-
`jasmine`
29+
```sh
30+
npx jasmine init
31+
````
5132

52-
## Configuration
33+
To seed your project with some examples:
5334

54-
Customize `spec/support/jasmine.json` to enumerate the source and spec files you would like the Jasmine runner to include.
55-
You may use dir glob strings.
56-
More information on the format of `jasmine.json` can be found in [the documentation](http://jasmine.github.io/edge/node.html#section-Configuration)
35+
```sh
36+
npx jasmine examples
37+
````
5738
58-
Alternatively, you may specify the path to your `jasmine.json` by setting an environment variable or an option:
39+
To run your test suite:
5940
60-
```shell
61-
jasmine JASMINE_CONFIG_PATH=relative/path/to/your/jasmine.json
62-
jasmine --config=relative/path/to/your/jasmine.json
63-
```
41+
```sh
42+
npx jasmine
43+
````
6444

6545
## ES and CommonJS module compatibility
6646

67-
By default, Jasmine uses `import` to load spec files and helper files. This
68-
should work for both ES modules and CommonJS modules. No additional
69-
configuration is required. If you need some files to be loaded via `require`,
70-
add `"jsLoader": "require"` to `jasmine.json`. With that set, Jasmine will use
71-
`require` to load all files with names that don't end in `.mjs`.
72-
73-
74-
# Filtering specs
75-
76-
Execute only those specs which filename match given glob:
77-
78-
```shell
79-
jasmine "spec/**/critical/*Spec.js"
80-
```
81-
82-
Or a single file:
83-
84-
```shell
85-
jasmine spec/currentSpec.js
86-
```
47+
Jasmine is compatible with both ES modules and CommonJS modules. See the
48+
[setup guide](https://jasmine.github.io/setup/nodejs.html) for more information.
8749

88-
Or execute only those specs which name matches a particular regex:
89-
90-
```shell
91-
jasmine --filter "adapter21*"
92-
```
93-
94-
(where the *name* of a spec is the first parameter passed to `describe()`)
9550

9651
## Node version compatibility
9752

9853
Jasmine supports Node 12.x where x >=17, Node 14, and Node 16.
9954

100-
10155
## Support
10256

10357
Documentation: [jasmine.github.io](https://jasmine.github.io)

0 commit comments

Comments
 (0)