Skip to content

Commit 5ab389f

Browse files
committed
Fix Test Toggle Watch behaviour
Fixes codesandbox#1414
1 parent 2ab5f2d commit 5ab389f

File tree

1 file changed

+5
-1
lines changed
  • packages/app/src/app/components/Preview/DevTools/Tests

1 file changed

+5
-1
lines changed

packages/app/src/app/components/Preview/DevTools/Tests/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ class Tests extends React.Component<Props, State> {
136136
};
137137

138138
handleMessage = (data: Object) => {
139-
if (data.type === 'done' && (!this.props.hidden || this.props.standalone)) {
139+
if (
140+
data.type === 'done' &&
141+
this.state.watching &&
142+
(!this.props.hidden || this.props.standalone)
143+
) {
140144
this.runAllTests();
141145
} else if (data.type === 'test') {
142146
switch (data.event) {

0 commit comments

Comments
 (0)