mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Fix linter errors.
This commit is contained in:
parent
33a9939b47
commit
6a5db2b314
@ -21,7 +21,7 @@ xdescribe("Consume Asset (Large size)", () => {
|
|||||||
...baseMetadata,
|
...baseMetadata,
|
||||||
base: {
|
base: {
|
||||||
...baseMetadata.base,
|
...baseMetadata.base,
|
||||||
files: [ {
|
files: [{
|
||||||
url: "https://speed.hetzner.de/1GB.bin",
|
url: "https://speed.hetzner.de/1GB.bin",
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,7 @@ import config from "../config"
|
|||||||
|
|
||||||
use(spies)
|
use(spies)
|
||||||
|
|
||||||
const reponsify = async data => ({ok: true, json: () => Promise.resolve(data)})
|
const reponsify = async (data) => ({ok: true, json: () => Promise.resolve(data)})
|
||||||
|
|
||||||
describe("Aquarius", () => {
|
describe("Aquarius", () => {
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ describe("Aquarius", () => {
|
|||||||
} as SearchQuery
|
} as SearchQuery
|
||||||
|
|
||||||
it("should query metadata", async () => {
|
it("should query metadata", async () => {
|
||||||
spy.on(ocean.utils.fetch, 'post', () => reponsify(getResults([new DDO()])))
|
spy.on(ocean.utils.fetch, "post", () => reponsify(getResults([new DDO()])))
|
||||||
|
|
||||||
const result = await aquarius.queryMetadata(query)
|
const result = await aquarius.queryMetadata(query)
|
||||||
assert.typeOf(result.results, "array")
|
assert.typeOf(result.results, "array")
|
||||||
@ -56,7 +56,7 @@ describe("Aquarius", () => {
|
|||||||
|
|
||||||
it("should query metadata and return real ddo", async () => {
|
it("should query metadata and return real ddo", async () => {
|
||||||
|
|
||||||
spy.on(ocean.utils.fetch, 'post', () => reponsify(getResults([new DDO()])))
|
spy.on(ocean.utils.fetch, "post", () => reponsify(getResults([new DDO()])))
|
||||||
|
|
||||||
const result = await aquarius.queryMetadata(query)
|
const result = await aquarius.queryMetadata(query)
|
||||||
assert.typeOf(result.results, "array")
|
assert.typeOf(result.results, "array")
|
||||||
@ -81,7 +81,7 @@ describe("Aquarius", () => {
|
|||||||
|
|
||||||
it("should query metadata by text", async () => {
|
it("should query metadata by text", async () => {
|
||||||
|
|
||||||
spy.on(ocean.utils.fetch, 'get', () => reponsify(getResults([new DDO()])))
|
spy.on(ocean.utils.fetch, "get", () => reponsify(getResults([new DDO()])))
|
||||||
|
|
||||||
const result = await aquarius.queryMetadataByText(query)
|
const result = await aquarius.queryMetadataByText(query)
|
||||||
assert.typeOf(result.results, "array")
|
assert.typeOf(result.results, "array")
|
||||||
@ -93,7 +93,7 @@ describe("Aquarius", () => {
|
|||||||
|
|
||||||
it("should query metadata and return real ddo", async () => {
|
it("should query metadata and return real ddo", async () => {
|
||||||
|
|
||||||
spy.on(ocean.utils.fetch, 'get', () => reponsify(getResults([new DDO()])))
|
spy.on(ocean.utils.fetch, "get", () => reponsify(getResults([new DDO()])))
|
||||||
|
|
||||||
const result = await aquarius.queryMetadataByText(query)
|
const result = await aquarius.queryMetadataByText(query)
|
||||||
assert.typeOf(result.results, "array")
|
assert.typeOf(result.results, "array")
|
||||||
@ -112,7 +112,7 @@ describe("Aquarius", () => {
|
|||||||
id: did.getId(),
|
id: did.getId(),
|
||||||
})
|
})
|
||||||
|
|
||||||
spy.on(ocean.utils.fetch, 'post', () => reponsify(ddo))
|
spy.on(ocean.utils.fetch, "post", () => reponsify(ddo))
|
||||||
|
|
||||||
const result: DDO = await aquarius.storeDDO(ddo)
|
const result: DDO = await aquarius.storeDDO(ddo)
|
||||||
assert(result)
|
assert(result)
|
||||||
@ -129,8 +129,8 @@ describe("Aquarius", () => {
|
|||||||
id: did.getId(),
|
id: did.getId(),
|
||||||
})
|
})
|
||||||
|
|
||||||
spy.on(ocean.utils.fetch, 'post', () => reponsify(ddo))
|
spy.on(ocean.utils.fetch, "post", () => reponsify(ddo))
|
||||||
spy.on(ocean.utils.fetch, 'get', () => reponsify(ddo))
|
spy.on(ocean.utils.fetch, "get", () => reponsify(ddo))
|
||||||
|
|
||||||
const storageResult: DDO = await aquarius.storeDDO(ddo)
|
const storageResult: DDO = await aquarius.storeDDO(ddo)
|
||||||
assert(storageResult)
|
assert(storageResult)
|
||||||
|
Loading…
Reference in New Issue
Block a user