'use strict'; const assert = require('assert'); const { _private } = require('../src/services/change_2fa_service'); assert.strictEqual( _private.shouldEnsureTwoStepVerificationEnabled(true), false, '替换已有 Authenticator 后不应重复检查两步验证开关', ); assert.strictEqual( _private.shouldEnsureTwoStepVerificationEnabled(false), true, '首次添加 Authenticator 后仍必须检查并开启两步验证', ); console.log('change_2fa_existing_authenticator_fast_path.test.js: PASS');