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
npm run build && npm run build:debug && npm run build:weval
115
109
```
116
110
117
-
Once that is done, the runtime and the CLI tool for applying it to JS source code can be built using npm:
118
-
```sh
119
-
npm run build && npm run build:starlingmonkey
120
-
```
111
+
## Testing a Local build in a Compute application
112
+
:warning:**You should not use this for production workloads!!!!!!!!**
113
+
114
+
You can test a local build of the JS Compute runtime by installing it in your JavaScript Compute application and running that locally or by uploading it to your Fastly service.
121
115
122
-
## Testing
116
+
1. First, follow the directions in [Building the JS Compute Runtime](#building-the-js-compute-runtime) for your platform to obtain a local build. The build outputs are the following files:
117
+
-`fastly.wasm`
118
+
-`fastly.debug.wasm`
119
+
-`fastly-weval.wasm`
120
+
-`fastly-ics.wevalcache`
121
+
122
+
2. Create a local tarball using npm.
123
+
```shell
124
+
npm pack
125
+
```
126
+
127
+
The resulting tarball will have a filename such as `fastly-js-compute-<version>.tgz`.
128
+
129
+
3. In your Compute application, install the tarball using `npm`:
4. Build and test or deploy your application as usual, using `fastly compute serve` or `fastly compute publish`, or an appropriate npm script.
135
+
136
+
## Testing a Dev Release in a Compute application
137
+
:warning:**You should not use this for production workloads!!!!!!!!**
138
+
139
+
Dev builds are released before production releases to allow for further testing. These are not released upstream to NPM, however you can acquire them from the [Releases](https://github.com/fastly/js-compute-runtime/releases/) section. Download the runtime for your platform, extract the executable and place it in the /node_modules/@fastly/js-compute/bin/PLATFORM folder of your Fastly Compute project. Then you can use the normal [Fastly CLI](https://github.com/fastly/cli) to build your service.
140
+
141
+
Please submit an [issue](https://github.com/fastly/js-compute-runtime/issues) if you find any problems during testing.
142
+
143
+
## Automated Testing
123
144
124
145
The JS Compute Runtime has automated tests which run on all pull-requests. The test applications are located within <./integration-tests/js-compute>.
125
146
@@ -129,10 +150,3 @@ To run an end-to-end test which builds and deploys an application to fastly:
129
150
- Install the test dependencies: `npm install`
130
151
- Get a list of all the applications to test: `node test.js`
131
152
- Test a single application via: `node test.js <name>` or test all via `node test.js --all`
132
-
133
-
## Testing a Dev Release
134
-
:warning:**You should not use this for production workloads!!!!!!!!**
135
-
136
-
Dev builds are released before production releases to allow for further testing. These are not released upstream to NPM, however you can acquire them from the [Releases](https://github.com/fastly/js-compute-runtime/releases/) section. Download the runtime for your platform, extract the executable and place it in the /node_modules/@fastly/js-compute/bin/PLATFORM folder of your Fastly Compute project. Then you can use the normal [Fastly CLI](https://github.com/fastly/cli) to build your service.
137
-
138
-
Please submit an [issue](https://github.com/fastly/js-compute-runtime/issues) if you find any problems during testing.
0 commit comments