Skip to content

Commit 551f2a0

Browse files
authored
Update DEVELOPMENT.md
1 parent c0b0822 commit 551f2a0

File tree

1 file changed

+9
-37
lines changed

1 file changed

+9
-37
lines changed

DEVELOPMENT.md

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -64,49 +64,21 @@ In addition you need to have the following tools installed to successfully build
6464
rustup override set 1.57.0
6565
```
6666

67-
Once that is done, the runtime and the CLI tool for applying it to JS source code can be built using cargo:
67+
Once that is done, the runtime and the CLI tool for applying it to JS source code can be built using npm:
6868
```sh
69-
cargo build --release
70-
```
71-
72-
#### Build a windows executable
73-
To build for windows on a linux system you need to install the following modules:
74-
75-
```
76-
sudo apt-get install gcc-mingw-w64
77-
rustup target add x86_64-pc-windows-gnu
78-
```
79-
80-
then you can run the following
81-
```sh
82-
cargo build --target x86_64-pc-windows-gnu --release
69+
npm run build
8370
```
8471

8572
## Testing
8673

87-
The JS Compute Runtime doesn't currently contain automated tests itself. Instead, Fastly runs an automated test suite for an internal repository for the JavaScript SDK using the runtime.
88-
89-
Manual testing is well supported, however. To test your changes, you can follow these steps:
90-
1. Build the runtime's CLI tool, see above
91-
2. Create a C@E service from a JS source file by running the CLI tool
92-
3. Test the service using [Fastly's local testing server](https://developer.fastly.com/learning/compute/testing/#running-a-local-testing-server)
74+
The JS Compute Runtime has automated tests which run on all pull-requests. The test applications are located within <./integration-tests/js-compute>.
9375

94-
As an example, to turn a file `test.js` with this source code:
95-
```js
96-
addEventListener('fetch', e => {
97-
console.log("Hello World!");
98-
});
99-
```
100-
101-
into a C@E service with your build of the CLI tool, run the following command:
102-
```sh
103-
cargo run --release -- test.js test.wasm
104-
```
105-
106-
Then test your service in Viceroy:
107-
```sh
108-
viceroy test.wasm
109-
```
76+
To run an end-to-end test which builds and deploys an application to c-at-e:
77+
- Build the runtime and cli: `npm run build` in the root of the project
78+
- Change to the test directory for the runtime: `cd integration-tests/js-compute/`
79+
- Install the test depenendencies: `npm install`
80+
- Get a list of all the applications to test: `node test.js`
81+
- Test a single application via: `node test.js <name>` or test all via `node test.js --all`
11082

11183
## Testing a Dev Release
11284
:warning: **You should not use this for production workloads!!!!!!!!**

0 commit comments

Comments
 (0)