All files / addon-test-support/extend index.js

100% Statements 5/5
66.67% Branches 2/3
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24                          2642x 665x 665x   1977x 1977x          
export { findElement } from './find-element';
export { findElementWithAssert } from './find-element-with-assert';
export { buildSelector, getContext, fullScope } from '../-private/helpers';
import {
  register as registerExecutionContext
} from '../-private/execution_context';
 
import IntegrationNativeEventsContext from '../-private/execution_context/integration-native-events';
import AcceptanceNativeEventsContext from '../-private/execution_context/acceptance-native-events';
import IntegrationEmberContext from '../-private/execution_context/integration';
import AcceptanceEmberContext from '../-private/execution_context/acceptance';
 
function useNativeEvents(flag = true) {
  if (flag) {
    registerExecutionContext('integration', IntegrationNativeEventsContext);
    registerExecutionContext('acceptance', AcceptanceNativeEventsContext);
  } else {
    registerExecutionContext('integration', IntegrationEmberContext);
    registerExecutionContext('acceptance', AcceptanceEmberContext);
  }
}
 
export { registerExecutionContext, useNativeEvents };