Skip to content

Commit 261e4f3

Browse files
committed
Remove console.log
1 parent d897ddd commit 261e4f3

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

tests/merklization.test.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -1144,18 +1144,24 @@ describe('merklize document with ipfs context', () => {
11441144
// node --experimental-vm-modules node_modules/jest/bin/jest.js -t 'set kubo client' tests/merklization.test.ts
11451145

11461146
const ipfsNodeURL = process.env.IPFS_URL ?? null;
1147+
const ipfsGatewayURL = process.env.IPFS_GATEWAY_URL ?? null;
1148+
11471149
if (!ipfsNodeURL) {
1148-
throw new Error('IPFS_URL is not set, skipping IPFS Node test');
1150+
throw new Error('IPFS_URL is not set');
1151+
}
1152+
1153+
if (!ipfsGatewayURL) {
1154+
throw new Error('IPFS_GATEWAY_URL is not set');
11491155
}
11501156

11511157
beforeAll(async () => {
11521158
await pushSchemasToIPFS(ipfsNodeURL);
11531159
});
11541160

1155-
it('ipfs gateway is set', async () => {
1161+
it('ipfsNodeURL is set', async () => {
11561162
const opts = {
11571163
documentLoader: cacheLoader({
1158-
ipfsGatewayURL: process.env.IPFS_GATEWAY_URL
1164+
ipfsNodeURL
11591165
})
11601166
};
11611167

@@ -1168,7 +1174,7 @@ describe('merklize document with ipfs context', () => {
11681174
it('ipfsGatewayURL is set', async () => {
11691175
const opts = {
11701176
documentLoader: cacheLoader({
1171-
ipfsGatewayURL: process.env.IPFS_GATEWAY_URL
1177+
ipfsGatewayURL
11721178
})
11731179
};
11741180
const mz: Merklizer = await Merklizer.merklizeJSONLD(ipfsDocument, opts);
@@ -1186,7 +1192,7 @@ describe('merklize document with ipfs context', () => {
11861192
it('TestExistenceProofIPFS', async () => {
11871193
const opts = {
11881194
documentLoader: cacheLoader({
1189-
ipfsGatewayURL: process.env.IPFS_GATEWAY_URL
1195+
ipfsGatewayURL
11901196
})
11911197
};
11921198
const mz = await Merklizer.merklizeJSONLD(testDocumentIPFS, opts);
@@ -1217,7 +1223,6 @@ async function pushSchemasToIPFS(ipfsNodeURL: string): Promise<void> {
12171223
: {};
12181224
url.username = '';
12191225
url.password = '';
1220-
console.log('url', url.toString());
12211226

12221227
return { url: url.toString(), headers };
12231228
};
@@ -1238,7 +1243,6 @@ async function pushSchemasToIPFS(ipfsNodeURL: string): Promise<void> {
12381243
if (records.length !== 2) {
12391244
throw new Error('IPFS records not found');
12401245
}
1241-
console.log('records', records);
12421246
} catch (e) {
12431247
console.warn('try to upload document', e);
12441248
const citizenshipData = await readFile('tests/testdata/citizenship-v1.jsonld');

0 commit comments

Comments
 (0)