diff --git a/package.json b/package.json index 92a5c257421b..7bc15f8efec3 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-taroapi": "file:packages/babel-plugin-transform-taroapi", + "babel-preset-power-assert": "^3.0.0", "conventional-changelog-cli": "^2.0.1", "copy": "^0.3.2", "css-loader": "^0.28.10", @@ -122,6 +123,7 @@ "node-sass": "^4.7.2", "npm-run-all": "^4.1.2", "ora": "^2.1.0", + "power-assert": "^1.6.1", "prettier": "^1.18.2", "react": "^16.10.2", "react-dom": "^16.10.2", diff --git a/packages/taro-components/__tests__/audio.spec.js b/packages/taro-components/__tests__/audio.spec.js index b5a5b56bfe36..c4d72a2cd411 100644 --- a/packages/taro-components/__tests__/audio.spec.js +++ b/packages/taro-components/__tests__/audio.spec.js @@ -2,6 +2,7 @@ import './polyfill' import * as React from 'nervjs' import { Audio } from '../h5' import { waitForChange } from './utils' +import * as assert from 'assert' // eslint-disable-next-line @typescript-eslint/no-unused-vars const h = React.createElement @@ -51,6 +52,11 @@ describe('Audio', () => { } render () { + const { + src, + controls, + loop + } = this.state return