mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Fix on unit tests.
This commit is contained in:
parent
b3f5bd68a9
commit
f002e5d616
@ -45,9 +45,9 @@ export class DDO {
|
|||||||
public service: Service[] = []
|
public service: Service[] = []
|
||||||
public proof: Proof
|
public proof: Proof
|
||||||
|
|
||||||
public constructor(ddo?: Partial<DDO>) {
|
public constructor(ddo: Partial<DDO> = {}) {
|
||||||
Object.assign(this, ddo, {
|
Object.assign(this, ddo, {
|
||||||
created: ddo.created || new Date().toISOString().replace(/\.[0-9]{3}/, ""),
|
created: (ddo && ddo.created) || new Date().toISOString().replace(/\.[0-9]{3}/, ""),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { assert } from "chai"
|
import { assert } from "chai"
|
||||||
import { zeroX, noZeroX, didPrefixed, noDidPrefixed } from "../../src/utils/ConversionTypeHelpers"
|
import { zeroX, noZeroX, didPrefixed, noDidPrefixed } from "../../src/utils/ConversionTypeHelpers"
|
||||||
|
|
||||||
describe.only("ConversionTypeHelpers", () => {
|
describe("ConversionTypeHelpers", () => {
|
||||||
describe("#zeroXTransformer()", () => {
|
describe("#zeroXTransformer()", () => {
|
||||||
it("should return the input if it's not hex value", async () => {
|
it("should return the input if it's not hex value", async () => {
|
||||||
const result1 = zeroX("Test 1")
|
const result1 = zeroX("Test 1")
|
||||||
|
Loading…
Reference in New Issue
Block a user