diff --git a/test/cases/generateVerifyToken.ts b/test/cases/generateVerifyToken.ts index ef02a5f..6ca5ad1 100644 --- a/test/cases/generateVerifyToken.ts +++ b/test/cases/generateVerifyToken.ts @@ -7,7 +7,7 @@ let mock: MockAdapter; import * as patreon from "../mocks/patreonMock"; import * as gumroad from "../mocks/gumroadMock"; import { client } from "../utils/httpClient"; -import { validatelicenseKeyRegex } from "../../src/routes/verifyToken"; +import { validateLicenseKeyRegex } from "../../src/routes/verifyToken"; const generateEndpoint = "/api/generateToken"; const getGenerateToken = (type: string, code: string | null, adminUserID: string | null) => client({ @@ -48,7 +48,7 @@ describe("generateToken test", function() { if (!config?.patreon) this.skip(); getGenerateToken("patreon", "patreon_code", "").then(res => { patreonLicense = extractLicenseKey(res.data); - assert.ok(validatelicenseKeyRegex(patreonLicense)); + assert.ok(validateLicenseKeyRegex(patreonLicense)); done(); }).catch(err => done(err)); }); @@ -58,14 +58,14 @@ describe("generateToken test", function() { if (!config?.patreon) this.skip(); getGenerateToken("patreon", "patreon_code", "").then(res => { patreonLicense = extractLicenseKey(res.data); - assert.ok(validatelicenseKeyRegex(patreonLicense)); + assert.ok(validateLicenseKeyRegex(patreonLicense)); done(); }).catch(err => done(err)); }); it("Should be able to create new local token", function (done) { createAndSaveToken(TokenType.local).then((licenseKey) => { - assert.ok(validatelicenseKeyRegex(licenseKey)); + assert.ok(validateLicenseKeyRegex(licenseKey)); localLicense = licenseKey; done(); }).catch(err => done(err)); diff --git a/test/cases/tokenUtils.ts b/test/cases/tokenUtils.ts index 4b3890e..742bf48 100644 --- a/test/cases/tokenUtils.ts +++ b/test/cases/tokenUtils.ts @@ -3,11 +3,11 @@ import { config } from "../../src/config"; import axios from "axios"; import * as tokenUtils from "../../src/utils/tokenUtils"; import MockAdapter from "axios-mock-adapter"; -import { validatelicenseKeyRegex } from "../../src/routes/verifyToken"; +import { validateLicenseKeyRegex } from "../../src/routes/verifyToken"; let mock: MockAdapter; import * as patreon from "../mocks/patreonMock"; -const validateToken = validatelicenseKeyRegex; +const validateToken = validateLicenseKeyRegex; describe("tokenUtils test", function() { before(function() {