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

Commit 06ee85d

Browse files
committed
test imports of non-exported things use relative paths
1 parent af83db8 commit 06ee85d

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

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

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

34
const expandCssShorthands = felaExpandCssShorthandsPlugin()
45

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { createRenderer } from 'fela'
22
import { renderToString } from 'fela-tools'
33
import { RULE_TYPE } from 'fela-utils'
44

5-
import felaFocusVisibleEnhancer from '@fluentui/react/src/utils/felaFocusVisibleEnhancer'
5+
// This is not exported
6+
import felaFocusVisibleEnhancer from '../../../src/utils/felaFocusVisibleEnhancer'
67

78
describe('felaFocusVisibleEnhancer', () => {
89
test('replaces :focus-visible', () => {

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

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

34
const renderInvokeKeyframes = felaInvokeKeyframesPlugin()
45

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

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

34
const assertCssPropertyValue = (value: string, isValid: boolean) => {
45
test(`assert that '${value}' is ${isValid ? 'valid' : 'invalid'}`, () => {

packages/react/test/specs/utils/mergeProviderContexts/mergeBooleanValues-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 { mergeBooleanValues } from '../../../../src/utils/mergeProviderContexts'
23

34
describe('mergeBooleanValues', () => {

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

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

45
describe('mergeRenderers', () => {

packages/react/test/specs/utils/positioner/getScrollParent-test.ts

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

3-
import getScrollParent from '@fluentui/react/src/utils/positioner/getScrollParent'
3+
// This is not exported
4+
import getScrollParent from '../../../../src/utils/positioner/getScrollParent'
45

56
const overflowStyles: Partial<CSSStyleDeclaration>[] = [
67
{ overflow: 'scroll' },

packages/react/test/specs/utils/positioner/positioningHelper-test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { Placement } from 'popper.js'
22

33
import { Alignment, Position } from '@fluentui/react'
4-
import {
5-
getPlacement,
6-
applyRtlToOffset,
7-
} from '@fluentui/react/src/utils/positioner/positioningHelper'
4+
// These are not exported
5+
import { getPlacement, applyRtlToOffset } from '../../../../src/utils/positioner/positioningHelper'
86

97
type PositionTestInput = {
108
align: Alignment

packages/styles/test/mergeThemes/mergeComponentStyles-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ComponentStyleFunctionParam, emptyTheme, withDebugId } from '@fluentui/styles'
22

3+
// These are not exported
34
import * as debugEnabled from '../../src/debugEnabled'
45
import { mergeComponentStyles__PROD, mergeComponentStyles__DEV } from '../../src/mergeThemes'
56

packages/styles/test/mergeThemes/mergeComponentVariables-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { objectKeyToValues, withDebugId } from '@fluentui/styles'
22

3+
// These are not exported
34
import * as debugEnabled from '../../src/debugEnabled'
45
import { mergeComponentVariables__PROD, mergeComponentVariables__DEV } from '../../src/mergeThemes'
56

packages/styles/test/mergeThemes/mergeSiteVariables-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { withDebugId } from '@fluentui/styles'
22

3+
// These are not exported
34
import * as debugEnabled from '../../src/debugEnabled'
45
import { mergeSiteVariables__PROD, mergeSiteVariables__DEV } from '../../src/mergeThemes'
56

packages/styles/test/mergeThemes/mergeThemeVariables-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { withDebugId } from '@fluentui/styles'
22
import * as _ from 'lodash'
33

4+
// These are not exported
45
import * as debugEnabled from '../../src/debugEnabled'
56
import { mergeThemeVariables__PROD, mergeThemeVariables__DEV } from '../../src/mergeThemes'
67

packages/styles/test/mergeThemes/mergeThemes-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
emptyTheme,
99
} from '@fluentui/styles'
1010

11+
// This is not exported
1112
import * as debugEnabled from '../../src/debugEnabled'
1213

1314
const styleParam: ComponentStyleFunctionParam = {

0 commit comments

Comments
 (0)