test: add test for validLink
This commit is contained in:
parent
1f5a36832c
commit
62a0e85554
5
jest.config.js
Normal file
5
jest.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
};
|
6
test/validLink.test.ts
Normal file
6
test/validLink.test.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import {describe, expect, test} from '@jest/globals';
|
||||
import validLink from "../lib/url/valid_link";
|
||||
|
||||
test("Plain, full URL", () => {
|
||||
expect(validLink("https://example.com/about-us")).toBe(true);
|
||||
});
|
Loading…
Reference in New Issue
Block a user