feat: test verification method against test mcaptcha instance
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
567bd494e6
commit
fe8dbadff4
1 changed files with 16 additions and 0 deletions
16
src/index.test.js
Normal file
16
src/index.test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const MCaptcha = require("./index");
|
||||
require("dotenv").config({ path: ".env.local" });
|
||||
const assert = require("assert").strict;
|
||||
|
||||
describe("test mCaptcha client", async function () {
|
||||
it("should be able verify authorization token", async function () {
|
||||
let mcaptcha = new MCaptcha(
|
||||
process.env.SITEKEY,
|
||||
process.env.SECRET,
|
||||
process.env.INSTANCE_URL
|
||||
);
|
||||
let res = await mcaptcha.verify(process.env.TOKEN);
|
||||
console.log(`verification status: ${res}`);
|
||||
assert.strictEqual(res, true);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue