From 0083c9693d17e91f462e911481b37d380d918e6e Mon Sep 17 00:00:00 2001 From: ZakaryCode Date: Tue, 1 Aug 2023 19:07:55 +0800 Subject: [PATCH] test(cli): udpate info --- packages/taro-cli/src/__tests__/info.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/taro-cli/src/__tests__/info.spec.ts b/packages/taro-cli/src/__tests__/info.spec.ts index cfd233750410..c1db9fbd69fc 100644 --- a/packages/taro-cli/src/__tests__/info.spec.ts +++ b/packages/taro-cli/src/__tests__/info.spec.ts @@ -54,9 +54,10 @@ describe('info', () => { expect('Binaries' in info).toBeTruthy() // envinfo 还不支持 yarn workspace // expect('npmPackages' in info).toBeTruthy() - // windows 操作系统可能不存在 System.Shell - expect(Object.keys(info.System)).toContain('OS') - expect(Object.keys(info.Binaries)).toEqual(['Node', 'Yarn', 'npm']) + // Note: windows 操作系统可能不存在 System.Shell + expect(Object.keys(info.System)).toEqual(expect.arrayContaining(['OS'])) + // Note: 环境内可能不包括 Yarn + expect(Object.keys(info.Binaries)).toEqual(expect.arrayContaining(['Node', 'npm'])) // expect(info.npmPackages.hasOwnProperty('@tarojs/helper')).toBeTruthy() // expect(info.npmPackages.hasOwnProperty('@tarojs/mini-runner')).toBeTruthy() // expect(info.npmPackages.hasOwnProperty('@tarojs/service')).toBeTruthy()