Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 4205275

Browse files
committed
test imports of non-exported things use relative paths
1 parent 427f4b6 commit 4205275

23 files changed

+36
-17
lines changed

packages/react-bindings/test/accesibility/getKeyDownHandlers-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This is not exported
12
import getKeyDownHandlers from '../../src/accessibility/getKeyDownHandlers'
23
// @ts-ignore
34
import * as keyboardKey from 'keyboard-key'

packages/react-bindings/test/accesibility/shouldHandleOnKeys-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This is not exported
12
import shouldHandleOnKeys from '../../src/accessibility/shouldHandleOnKeys'
23

34
const getEventArg = (

packages/react-bindings/test/styles/resolveStylesAndClasses-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {
44
emptyTheme,
55
ICSSInJSStyle,
66
} from '@fluentui/styles'
7-
import resolveStylesAndClasses from '@fluentui/react-bindings/src/styles/resolveStylesAndClasses'
7+
// This is not exported
8+
import resolveStylesAndClasses from '../../src/styles/resolveStylesAndClasses'
89

910
const styleParam: ComponentStyleFunctionParam = {
1011
disableAnimations: false,

packages/react/test/specs/components/Debug/utils-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
// These are not exported
12
import {
23
find,
34
isOverridden,
45
filter,
56
getValues,
67
removeNulls,
7-
} from '@fluentui/react/src/components/Debug/utils'
8+
} from '../../../../src/components/Debug/utils'
89

910
describe('debugUtils', () => {
1011
describe('find', () => {

packages/react/test/specs/components/Icon/Icon-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ThemeInput } from '@fluentui/styles'
22
import * as React from 'react'
33
import { isConformant, handlesAccessibility, getRenderedAttribute } from '../../commonTests'
44

5-
import Icon from '../../../../src/components/Icon/Icon'
5+
import { Icon } from '@fluentui/react'
66
import { mountWithProviderAndGetComponent } from '../../../utils'
77

88
describe('Icon', () => {

packages/react/test/specs/components/Portal/Portal-test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import * as React from 'react'
22
import { domEvent, nextFrame, mountWithProvider } from '../../../utils'
33

44
import { Portal } from '@fluentui/react'
5-
import PortalInner from '@fluentui/react/src/components/Portal/PortalInner'
5+
// This is not exported
6+
import PortalInner from '../../../../src/components/Portal/PortalInner'
67

78
describe('Portal', () => {
89
const testPortalInnerIsOpen = (rootWrapper, visible: boolean) => {

packages/react/test/specs/components/PortalInner/PortalInner-test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
22

3-
import PortalInner, { PortalInnerProps } from '@fluentui/react/src/components/Portal/PortalInner'
3+
// These are not exported
4+
import PortalInner, { PortalInnerProps } from '../../../../src/components/Portal/PortalInner'
45
import { mountWithProvider } from '../../../utils'
56

67
const mountPortalInner = (props: PortalInnerProps) =>

packages/react/test/specs/themes/teams/components/Icon/Icon-test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as _ from 'lodash'
22
import * as React from 'react'
33
import { shallow } from 'enzyme'
44

5+
// These are not exported
56
import icons, { teamsIconClassNames } from '../../../../../../src/themes/teams/components/Icon/svg'
67
import processedIcons from '../../../../../../src/themes/teams/components/Icon/svg/processedIndex'
78
import { SvgIconSpecWithStyles } from '../../../../../../src/themes/teams/components/Icon/svg/types'

packages/react/test/specs/utils/accessibility/FocusContainer-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ContainerFocusHandler } from '@fluentui/react/src/utils/accessibility/FocusHandling/FocusContainer'
1+
// This is not exported
2+
import { ContainerFocusHandler } from '../../../../src/utils/accessibility/FocusHandling/FocusContainer'
23

34
const createFocusContainer = (
45
{ itemsCount, setFocusAtFn }: { itemsCount: number; setFocusAtFn?: () => void } = {

packages/react/test/specs/utils/felaDisableAnimationsPlugin-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import felaDisableAnimationsPlugin from '@fluentui/react/src/utils/felaDisableAnimationsPlugin'
1+
// This is not exported
2+
import felaDisableAnimationsPlugin from '../../../src/utils/felaDisableAnimationsPlugin'
23

34
const disableAnimationsPlugin = felaDisableAnimationsPlugin()
45

0 commit comments

Comments
 (0)