1
0
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:
Pedro Gutiérrez 2019-03-14 18:44:26 +01:00 committed by Pedro Gutiérrez
parent b3f5bd68a9
commit f002e5d616
2 changed files with 3 additions and 3 deletions

View File

@ -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}/, ""),
}) })
} }

View File

@ -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")