import assert from 'node:assert/strict'
import test from 'node:test'

import { isWorkerPasswordStrong } from '../src/utils/worker-password.ts'

test('接单密码至少八位且必须包含英文字母和数字', () => {
  assert.equal(isWorkerPasswordStrong('abc12345'), true)
  assert.equal(isWorkerPasswordStrong('ABC12345'), true)
  assert.equal(isWorkerPasswordStrong('12345678'), false)
  assert.equal(isWorkerPasswordStrong('abcdefgh'), false)
  assert.equal(isWorkerPasswordStrong('abc1234'), false)
})
