Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Dec 14, 2019
1 parent 498532a commit 6cb39d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
8 changes: 4 additions & 4 deletions test/gateway/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@ test('qx-script', async t => {
const app = gateway.createKoaApp(surgioServer);

const res1 = await request(app.callback())
.get('/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fmaster%2Fsample-rewrite-with-script.js')
.get('/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js')
.expect(200);
const res2 = await request(app.callback())
.get('/qx-script?id=abcdef&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fmaster%2Fsample-rewrite-with-script.js')
.get('/qx-script?id=abcdef&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js')
.expect(200);
const res3 = await request(app.callback())
.get('/qx-script?id=abcdef,bcdefg&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fmaster%2Fsample-rewrite-with-script.js')
.get('/qx-script?id=abcdef,bcdefg&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js')
.expect(200);
const res4 = await request(app.callback())
.get('/qx-script?id=abcdef&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fmaster%2Fsample-rewrite-with-script.js')
.get('/qx-script?id=abcdef&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js')
.expect(200);

t.snapshot(res1.body.toString());
Expand Down
24 changes: 0 additions & 24 deletions test/gateway/snapshots/index.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ Generated by [AVA](https://ava.li).
* THIS COMMENT IS GENERATED BY SURGIO␊
*/␊
/**␊
* @supported 23AD6B11CD4B 55BE3B10F8A1␊
* The above random generated device ID can be found at the bottom of Quantumult X additional menu, and may be changed when system restored.␊
* Indicate what device are supported by the file. This is necessary when the file is not loaded from local("On My iPhone - Quantumult X - Scripts").␊
*/␊
// $request, $response, $notify(title, subtitle, message), console.log(message)␊
// $request.scheme, $request.method, $request.url, $request.path, $request.headers␊
// $response.statusCode, $response.headers, $response.body␊
Expand All @@ -161,12 +155,6 @@ Generated by [AVA](https://ava.li).
* THIS COMMENT IS GENERATED BY SURGIO␊
*/␊
/**␊
* @supported 23AD6B11CD4B 55BE3B10F8A1␊
* The above random generated device ID can be found at the bottom of Quantumult X additional menu, and may be changed when system restored.␊
* Indicate what device are supported by the file. This is necessary when the file is not loaded from local("On My iPhone - Quantumult X - Scripts").␊
*/␊
// $request, $response, $notify(title, subtitle, message), console.log(message)␊
// $request.scheme, $request.method, $request.url, $request.path, $request.headers␊
// $response.statusCode, $response.headers, $response.body␊
Expand All @@ -191,12 +179,6 @@ Generated by [AVA](https://ava.li).
* THIS COMMENT IS GENERATED BY SURGIO␊
*/␊
/**␊
* @supported 23AD6B11CD4B 55BE3B10F8A1␊
* The above random generated device ID can be found at the bottom of Quantumult X additional menu, and may be changed when system restored.␊
* Indicate what device are supported by the file. This is necessary when the file is not loaded from local("On My iPhone - Quantumult X - Scripts").␊
*/␊
// $request, $response, $notify(title, subtitle, message), console.log(message)␊
// $request.scheme, $request.method, $request.url, $request.path, $request.headers␊
// $response.statusCode, $response.headers, $response.body␊
Expand All @@ -221,12 +203,6 @@ Generated by [AVA](https://ava.li).
* THIS COMMENT IS GENERATED BY SURGIO␊
*/␊
/**␊
* @supported 23AD6B11CD4B 55BE3B10F8A1␊
* The above random generated device ID can be found at the bottom of Quantumult X additional menu, and may be changed when system restored.␊
* Indicate what device are supported by the file. This is necessary when the file is not loaded from local("On My iPhone - Quantumult X - Scripts").␊
*/␊
// $request, $response, $notify(title, subtitle, message), console.log(message)␊
// $request.scheme, $request.method, $request.url, $request.path, $request.headers␊
// $response.statusCode, $response.headers, $response.body␊
Expand Down
Binary file modified test/gateway/snapshots/index.test.ts.snap
Binary file not shown.

0 comments on commit 6cb39d8

Please sign in to comment.