Initial speaking practice site
This commit is contained in:
commit
bcebeaef82
38 files changed
+10698
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { getFileInputState } from "../admin.js";
|
||||
|
||||
function run() {
|
||||
assert.deepEqual(getFileInputState(null, "选择视频文件"), {
|
||||
text: "选择视频文件",
|
||||
title: "选择视频文件",
|
||||
isSelected: false,
|
||||
});
|
||||
|
||||
assert.deepEqual(getFileInputState({ name: "lesson-one-shadowing.mp4" }, "选择视频文件"), {
|
||||
text: "已选:lesson-one-shadowing.mp4",
|
||||
title: "lesson-one-shadowing.mp4",
|
||||
isSelected: true,
|
||||
});
|
||||
|
||||
assert.deepEqual(getFileInputState({ name: "a-very-long-subtitle-file-name-for-practice.vtt" }, "英文字幕 .srt/.vtt"), {
|
||||
text: "已选:a-very-long-subtitle-file-name-for-practice.vtt",
|
||||
title: "a-very-long-subtitle-file-name-for-practice.vtt",
|
||||
isSelected: true,
|
||||
});
|
||||
}
|
||||
|
||||
run();
|
||||
Reference in new issue
Block a user