Skip to content

Commit cfc0635

Browse files
Guy BedfordJakeChampion
authored andcommitted
latest update
1 parent eb67185 commit cfc0635

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

c-dependencies/spidermonkey

integration-tests/js-compute/fixtures/byob/bin/index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/* global fastly */
33
function strictEqual (a, b) {
44
if (a !== b) {
5-
console.log('LHS: ', a);
6-
console.log('RHS: ', b);
5+
console.log('ACTUAL: ', a);
6+
console.log('EXPECTED: ', b);
77
throw new Error(`Assertion failure`);
88
}
99
}
@@ -15,8 +15,8 @@ addEventListener("fetch", async (event) => {
1515
autoAllocateChunkSize: 1024,
1616
async pull (controller) {
1717
const view = controller.byobRequest.view;
18-
19-
if (cnt === 0) {
18+
cnt++;
19+
if (cnt === 1) {
2020
let cnt = 0;
2121
const stream = new ReadableStream({
2222
type: 'bytes',
@@ -72,7 +72,7 @@ addEventListener("fetch", async (event) => {
7272
view[3] = 49;
7373
controller.byobRequest.respond(4);
7474
}
75-
else if (cnt === 1) {
75+
else if (cnt === 2) {
7676
let cnt = 0;
7777
const stream = new ReadableStream({
7878
type: 'bytes',
@@ -111,15 +111,14 @@ addEventListener("fetch", async (event) => {
111111
controller.byobRequest.respond(4);
112112
}
113113
}
114-
else if (cnt === 2) {
114+
else if (cnt === 3) {
115115
view[0] = 104;
116116
view[1] = 101;
117117
view[2] = 121;
118118
view[3] = 51;
119119
controller.byobRequest.respond(4);
120120
controller.close();
121121
}
122-
cnt++;
123122
}
124123
});
125124
event.respondWith(new Response(stream));

integration-tests/js-compute/fixtures/byob/fastly.toml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["[email protected]"]
55
description = ""
66
language = "other"
77
manifest_version = 2
8-
name = "console"
8+
name = "byob"
99
service_id = ""
1010

1111
[scripts]

0 commit comments

Comments
 (0)