Skip to content

Commit f4d20a9

Browse files
committed
chore: removes logging
1 parent 27dd945 commit f4d20a9

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

test/dev.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require('fs');
22
const path = require('path');
3-
const { register } = require('esbuild-register/dist/node');
3+
const swcRegister = require('@swc/register');
44

55
const [testSuiteDir] = process.argv.slice(2);
66

@@ -20,8 +20,16 @@ process.env.PAYLOAD_CONFIG_PATH = configPath;
2020

2121
process.env.PAYLOAD_DROP_DATABASE = 'true';
2222

23-
register({
24-
platform: 'node',
23+
swcRegister({
24+
jsc: {
25+
parser: {
26+
syntax: 'typescript',
27+
tsx: true,
28+
},
29+
},
30+
module: {
31+
type: 'commonjs',
32+
},
2533
});
2634

2735
require('./devServer');

test/helpers/rest.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,10 @@ export class RESTClient {
139139
}
140140

141141
const slug = args.slug || this.defaultSlug;
142-
try {
143-
const response = await fetch(`${this.serverURL}/api/${slug}`, options);
144-
const { status } = response;
145-
const { doc } = await response.json();
146-
return { status, doc };
147-
} catch (err) {
148-
console.error(err);
149-
return { status: 500 };
150-
}
142+
const response = await fetch(`${this.serverURL}/api/${slug}`, options);
143+
const { status } = response;
144+
const { doc } = await response.json();
145+
return { status, doc };
151146
}
152147

153148
async find<T = any>(args?: FindArgs): Promise<QueryResponse<T>> {

0 commit comments

Comments
 (0)