You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-2Lines changed: 53 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,9 @@ This repository contains `scalajs-env-jsdom-nodejs` for Scala.js 1.x. In
8
8
Scala.js 0.6.x, the Node.js with jsdom environment is part of the core
9
9
distribution.
10
10
11
-
## Usage
11
+
## Setup
12
+
13
+
These instructions setup your test environment on Node.js such that you can write tests as if they were running on an HTML page.
12
14
13
15
Add the following line to `project/plugins.sbt`:
14
16
@@ -26,7 +28,56 @@ Finally, make sure that [jsdom](https://github.com/jsdom/jsdom) 10.0.0 or later
26
28
You can install it with
27
29
28
30
```bash
29
-
$ npm install jsdom
31
+
$ npm install jsdom --save-dev
32
+
```
33
+
34
+
Or with yarn if you prefer
35
+
36
+
```bash
37
+
$ yarn add jsdom --dev
30
38
```
31
39
32
40
See [the Scaladoc](https://javadoc.io/doc/org.scala-js/scalajs-env-jsdom-nodejs_2.13/latest/org/scalajs/jsenv/jsdomnodejs/index.html) for other configuration options.
41
+
42
+
## Usage - Writing a test
43
+
44
+
To access the dom, you will need to install [`scala-js-dom`](https://github.com/scala-js/scala-js-dom):
0 commit comments