完成80%
This commit is contained in:
@@ -26,7 +26,7 @@ const run = async () => {
|
||||
|
||||
const firstValues = [];
|
||||
const first = createAuthSmsCooldown({
|
||||
sceneCode: "APP_SMS_LOGIN",
|
||||
operationCode: "sms-login",
|
||||
onChange: (value) => firstValues.push(value),
|
||||
now: () => now,
|
||||
setIntervalFn,
|
||||
@@ -43,7 +43,7 @@ const run = async () => {
|
||||
|
||||
const restoredValues = [];
|
||||
const restored = createAuthSmsCooldown({
|
||||
sceneCode: "APP_SMS_LOGIN",
|
||||
operationCode: "sms-login",
|
||||
onChange: (value) => restoredValues.push(value),
|
||||
now: () => now,
|
||||
setIntervalFn,
|
||||
@@ -56,7 +56,7 @@ const run = async () => {
|
||||
);
|
||||
|
||||
const other = createAuthSmsCooldown({
|
||||
sceneCode: "APP_REGISTER",
|
||||
operationCode: "register",
|
||||
onChange: () => {},
|
||||
now: () => now,
|
||||
setIntervalFn,
|
||||
@@ -72,10 +72,10 @@ const run = async () => {
|
||||
assert.throws(
|
||||
() =>
|
||||
createAuthSmsCooldown({
|
||||
sceneCode: "",
|
||||
operationCode: "",
|
||||
onChange: () => {},
|
||||
}),
|
||||
/sceneCode/,
|
||||
/operationCode/,
|
||||
);
|
||||
|
||||
process.stdout.write("AUTH-SMS-COOLDOWN-RUNTIME-SMOKE PASS\n");
|
||||
|
||||
Reference in New Issue
Block a user