|
|
@ -119,9 +119,31 @@ class DomSideEffectTests { |
|
|
|
Div { |
|
|
|
Div { |
|
|
|
DomSideEffect(key) { |
|
|
|
DomSideEffect(key) { |
|
|
|
effectsList.add("DomSideEffect") |
|
|
|
effectsList.add("DomSideEffect") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDispose { |
|
|
|
|
|
|
|
effectsList.add("DomSideEffectIgnored") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDispose { |
|
|
|
|
|
|
|
throw Exception("this should be ignored") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDispose { |
|
|
|
|
|
|
|
effectsList.add("DomSideEffectDisposed") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
DisposableRefEffect(key) { |
|
|
|
DisposableRefEffect(key) { |
|
|
|
effectsList.add("DisposableRefEffect") |
|
|
|
effectsList.add("DisposableRefEffect") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDispose { |
|
|
|
|
|
|
|
effectsList.add("DisposableRefEffectIgnored") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDispose { |
|
|
|
|
|
|
|
throw Exception("this should be ignored") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onDispose { |
|
|
|
onDispose { |
|
|
|
effectsList.add("DisposableRefEffectDisposed") |
|
|
|
effectsList.add("DisposableRefEffectDisposed") |
|
|
|
} |
|
|
|
} |
|
|
@ -140,7 +162,14 @@ class DomSideEffectTests { |
|
|
|
waitForRecompositionComplete() |
|
|
|
waitForRecompositionComplete() |
|
|
|
|
|
|
|
|
|
|
|
assertContentEquals( |
|
|
|
assertContentEquals( |
|
|
|
listOf("DisposableRefEffect", "DomSideEffect", "DisposableRefEffectDisposed", "DisposableRefEffect", "DomSideEffect"), |
|
|
|
listOf( |
|
|
|
|
|
|
|
"DisposableRefEffect", |
|
|
|
|
|
|
|
"DomSideEffect", |
|
|
|
|
|
|
|
"DisposableRefEffectDisposed", |
|
|
|
|
|
|
|
"DomSideEffectDisposed", |
|
|
|
|
|
|
|
"DisposableRefEffect", |
|
|
|
|
|
|
|
"DomSideEffect" |
|
|
|
|
|
|
|
), |
|
|
|
effectsList |
|
|
|
effectsList |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|