Skip to content

Commit 5764f2a

Browse files
authored
Merge pull request #214 from chaijs/update-browser-install-instructions
Update browser install instructions
2 parents dd3d791 + c24fc92 commit 5764f2a

File tree

1 file changed

+7
-37
lines changed

1 file changed

+7
-37
lines changed

_guides/installation.md

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,17 @@ that include Chai.
2121
Package is available through [npm](http://npmjs.org):
2222

2323
```bash
24-
npm install chai
25-
```
26-
27-
Recommend adding it to `package.json` devDependencies using a `*` as the version tag.
28-
This will ensure that you always have the most recent version after running `npm install`,
29-
which can be especially powerful when paired with a continuous integration tool.
30-
31-
```javascript
32-
"devDependencies": {
33-
"chai": "*",
34-
"mocha": "*"
35-
}, "//": "mocha is our preference, but you can use any test runner you like"
24+
npm install --save-dev chai
3625
```
3726

3827
### Browser
3928

40-
Include the chai browser build in your testing suite.
29+
Include the chai browser build in your testing suite. You can either link to your own self-hosted version of chai or through a NPM CDN like [jsDelivr](https://www.jsdelivr.com/) or [unpkg](https://www.unpkg.com/).
4130

4231
```html
43-
<script src="chai.js" type="text/javascript"></script>
44-
```
45-
46-
This will provide `chai` as a global object, or `define` it if you are using AMD.
47-
48-
The latest tagged version will be available for hot-linking at [http://chaijs.com/chai.js]({{site.github.url}}/chai.js).
49-
If you prefer to host yourself, use the `chai.js` file from the root of the github project.
50-
We recommend that you always use a version tag as your starting point, so the
51-
[tag download list](https://github.com/chaijs/chai/tags) is the best place to start.
32+
<script type="module">
33+
import { expect } from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';
5234
53-
Currently supports all modern browsers: IE 9+, Chrome 7+, FireFox 4+, Safari 5+. Please note
54-
that the `should` style is currently not compatible with IE9.
55-
56-
If you want to know if your browser is compatible, run the [online test suite]({{site.github.url}}/api/test/).
57-
58-
### Other Platforms
59-
60-
#### Ruby
61-
62-
##### [Konacha](https://github.com/jfirebaugh/konacha)
63-
64-
For testing your Ruby on Rails application using Chai assertions
65-
and the Mocha test framework, check out Konacha -- a modern
66-
test harness that takes full advantage of Rails 3 features such as the
67-
asset pipeline and engines.
35+
expect(1 + 1).to.equal(2);
36+
</script>
37+
```

0 commit comments

Comments
 (0)