test: test for directives

This commit is contained in:
Evan You
2019-09-02 12:09:29 -04:00
parent 94e72481b8
commit aac807bc63
8 changed files with 203 additions and 36 deletions

View File

@@ -104,7 +104,12 @@ export function handleError(
}
function logError(err: Error, type: AllErrorTypes, contextVNode: VNode | null) {
if (__DEV__) {
// default behavior is crash in prod & test, recover in dev.
// TODO we should probably make this configurable via `createApp`
if (
__DEV__ &&
!(typeof process !== 'undefined' && process.env.NODE_ENV === 'test')
) {
const info = ErrorTypeStrings[type]
if (contextVNode) {
pushWarningContext(contextVNode)