Skip to content

Commit

Permalink
test(cli): udpate info
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Sep 22, 2023
1 parent 935208d commit dc3c59a
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 88 deletions.
Empty file removed packages/jest-helper/lib/index.js
Empty file.
10 changes: 0 additions & 10 deletions packages/jest-helper/lib/sequencer.js

This file was deleted.

20 changes: 0 additions & 20 deletions packages/jest-helper/lib/snapshot/resolver.js

This file was deleted.

51 changes: 0 additions & 51 deletions packages/jest-helper/lib/snapshot/serializers.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/taro-cli/bin/taro
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
require('../dist/util').printPkgVersion()

const CLI = require('../dist/cli').default

new CLI().run()
7 changes: 4 additions & 3 deletions packages/taro-cli/src/__tests__/info.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ exports[`vue should build vue app 2`] = `
/** filePath: dist/css/app.css **/
/** filePath: dist/index.html **/
<!doctype html><html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no,address=no"><meta name="apple-mobile-web-app-status-bar-style" content="white"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title></title><script>!function(x){function w(){var v,u,t,tes,s=x.document,r=s.documentElement,a=r.getBoundingClientRect().width;if(!v&&!u){var n=!!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);v=x.devicePixelRatio;tes=x.devicePixelRatio;v=n?v:1,u=1/v}if(a>=640){r.style.fontSize="40px"}else{if(a<=320){r.style.fontSize="20px"}else{r.style.fontSize=a/320*20+"px"}}}x.addEventListener("resize",function(){w()});w()}(window);</script><link href="/css/app.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/app.js"></script></body></html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ exports[`vue3 should build vue3 app 2`] = `
/** filePath: dist/css/app.css **/
/** filePath: dist/index.html **/
<!doctype html><html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no,address=no"><meta name="apple-mobile-web-app-status-bar-style" content="white"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title></title><script>!function(x){function w(){var v,u,t,tes,s=x.document,r=s.documentElement,a=r.getBoundingClientRect().width;if(!v&&!u){var n=!!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);v=x.devicePixelRatio;tes=x.devicePixelRatio;v=n?v:1,u=1/v}if(a>=640){r.style.fontSize="40px"}else{if(a<=320){r.style.fontSize="20px"}else{r.style.fontSize=a/320*20+"px"}}}x.addEventListener("resize",function(){w()});w()}(window);</script><link href="/css/app.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/app.js"></script></body></html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6082,7 +6082,6 @@ exports[`framework should build vue app web 2`] = `
"
/** filePath: dist/css/app.css **/
/** filePath: dist/index.html **/
<!doctype html><html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no,address=no"><meta name="apple-mobile-web-app-status-bar-style" content="white"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title></title><script>!function(x){function w(){var v,u,t,tes,s=x.document,r=s.documentElement,a=r.getBoundingClientRect().width;if(!v&&!u){var n=!!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);v=x.devicePixelRatio;tes=x.devicePixelRatio;v=n?v:1,u=1/v}if(a>=640){r.style.fontSize="40px"}else{if(a<=320){r.style.fontSize="20px"}else{r.style.fontSize=a/320*20+"px"}}}x.addEventListener("resize",function(){w()});w()}(window);</script><script defer="defer" src="/js/app.js"></script><link href="/css/app.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
Expand Down Expand Up @@ -7809,7 +7808,6 @@ exports[`framework should build vue3 app web 2`] = `
"
/** filePath: dist/css/app.css **/
/** filePath: dist/index.html **/
<!doctype html><html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="format-detection" content="telephone=no,address=no"><meta name="apple-mobile-web-app-status-bar-style" content="white"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title></title><script>!function(x){function w(){var v,u,t,tes,s=x.document,r=s.documentElement,a=r.getBoundingClientRect().width;if(!v&&!u){var n=!!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);v=x.devicePixelRatio;tes=x.devicePixelRatio;v=n?v:1,u=1/v}if(a>=640){r.style.fontSize="40px"}else{if(a<=320){r.style.fontSize="20px"}else{r.style.fontSize=a/320*20+"px"}}}x.addEventListener("resize",function(){w()});w()}(window);</script><script defer="defer" src="/js/app.js"></script><link href="/css/app.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
Expand Down

0 comments on commit dc3c59a

Please sign in to comment.