chore: Move editor into codebase (#2930)
This commit is contained in:
23
shared/editor/embeds/Bilibili.test.ts
Normal file
23
shared/editor/embeds/Bilibili.test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import Bilibili from "./Bilibili";
|
||||
|
||||
describe("Bilibili", () => {
|
||||
const match = Bilibili.ENABLED[0];
|
||||
|
||||
test("to be enabled on video link", () => {
|
||||
expect(
|
||||
"https://www.bilibili.com/video/BV1CV411s7jd?spm_id_from=333.999.0.0".match(
|
||||
match
|
||||
)
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
test("to not be enabled elsewhere", () => {
|
||||
expect("https://youtu.be".match(match)).toBe(null);
|
||||
expect("https://bilibili.com".match(match)).toBe(null);
|
||||
expect("https://www.bilibili.com".match(match)).toBe(null);
|
||||
expect("https://www.bilibili.com/logout".match(match)).toBe(null);
|
||||
expect("https://www.bilibili.com/feed/subscriptions".match(match)).toBe(
|
||||
null
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user