Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Goo committed Aug 22, 2018
1 parent 21955dd commit cc1ee56
Show file tree
Hide file tree
Showing 39 changed files with 52 additions and 55 deletions.
3 changes: 1 addition & 2 deletions test/unit/mdc-animation/mdc-animation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
import {assert} from 'chai';
import td from 'testdouble';

import {getCorrectEventName} from '../../../packages/mdc-animation';
import {getCorrectPropertyName} from '../../../packages/mdc-animation';
import {getCorrectPropertyName, getCorrectEventName} from '../../../packages/mdc-animation/index';

// Has no properties without a prefix
const legacyWindowObj = td.object({
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-auto-init/mdc-auto-init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import bel from 'bel';
import td from 'testdouble';
import {assert} from 'chai';
import mdcAutoInit from '../../../packages/mdc-auto-init';
import mdcAutoInit from '../../../packages/mdc-auto-init/index';

class FakeComponent {
static attachTo(node) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-base/component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {assert} from 'chai';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCComponent} from '../../../packages/mdc-base';
import {MDCComponent} from '../../../packages/mdc-base/index';

class FakeComponent extends MDCComponent {
get root() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-base/foundation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

import {assert} from 'chai';
import {MDCFoundation} from '../../../packages/mdc-base';
import {MDCFoundation} from '../../../packages/mdc-base/index';

class FakeFoundation extends MDCFoundation {
get adapter() {
Expand Down
6 changes: 3 additions & 3 deletions test/unit/mdc-checkbox/mdc-checkbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import td from 'testdouble';

import {supportsCssVariables} from '../../../packages/mdc-ripple/util';
import {createMockRaf} from '../helpers/raf';
import {MDCCheckbox} from '../../../packages/mdc-checkbox';
import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCCheckbox} from '../../../packages/mdc-checkbox/index';
import {MDCRipple} from '../../../packages/mdc-ripple/index';
import {strings} from '../../../packages/mdc-checkbox/constants';
import {getCorrectEventName} from '../../../packages/mdc-animation';
import {getCorrectEventName} from '../../../packages/mdc-animation/index';
import {getMatchesProperty} from '../../../packages/mdc-ripple/util';

function getFixture() {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/mdc-chips/mdc-chip-set.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import {assert} from 'chai';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCChipSet, MDCChipSetFoundation} from '../../../packages/mdc-chips/chip-set';
import {MDCChipFoundation} from '../../../packages/mdc-chips/chip';
import {MDCChipSet, MDCChipSetFoundation} from '../../../packages/mdc-chips/chip-set/index';
import {MDCChipFoundation} from '../../../packages/mdc-chips/chip/index';

const getFixture = () => bel`
<div class="mdc-chip-set">
Expand Down
4 changes: 2 additions & 2 deletions test/unit/mdc-chips/mdc-chip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import {assert} from 'chai';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCChip, MDCChipFoundation} from '../../../packages/mdc-chips/chip';
import {MDCRipple} from '../../../packages/mdc-ripple/index';
import {MDCChip, MDCChipFoundation} from '../../../packages/mdc-chips/chip/index';

const getFixture = () => bel`
<div class="mdc-chip">
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-dialog/mdc-dialog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import domEvents from 'dom-events';
import td from 'testdouble';
import {createMockRaf} from '../helpers/raf';
import {strings} from '../../../packages/mdc-dialog/constants';
import {MDCDialog, util} from '../../../packages/mdc-dialog';
import {MDCDialog, util} from '../../../packages/mdc-dialog/index';
import {supportsCssVariables} from '../../../packages/mdc-ripple/util';

function getFixture() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-drawer/mdc-persistent-drawer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCPersistentDrawer} from '../../../packages/mdc-drawer/persistent';
import {MDCPersistentDrawer} from '../../../packages/mdc-drawer/persistent/index';
import {strings} from '../../../packages/mdc-drawer/persistent/constants';
import {getTransformPropertyName} from '../../../packages/mdc-drawer/util';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-drawer/mdc-temporary-drawer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCTemporaryDrawer} from '../../../packages/mdc-drawer/temporary';
import {MDCTemporaryDrawer} from '../../../packages/mdc-drawer/temporary/index';
import {strings} from '../../../packages/mdc-drawer/temporary/constants';
import {getTransformPropertyName, supportsCssCustomProperties} from '../../../packages/mdc-drawer/util';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-drawer/slidable.foundation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import td from 'testdouble';

import {captureHandlers, verifyDefaultAdapter} from '../helpers/foundation';
import {createMockRaf} from '../helpers/raf';
import {MDCSlidableDrawerFoundation} from '../../../packages/mdc-drawer/slidable';
import {MDCSlidableDrawerFoundation} from '../../../packages/mdc-drawer/slidable/index';

function setupTest(isRootTransitioningEventTarget) {
const mockAdapter = td.object(MDCSlidableDrawerFoundation.defaultAdapter);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-form-field/mdc-form-field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCFormField} from '../../../packages/mdc-form-field';
import {MDCFormField} from '../../../packages/mdc-form-field/index';

function getFixture() {
return bel`
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-grid-list/mdc-grid-list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCGridList} from '../../../packages/mdc-grid-list';
import {MDCGridList} from '../../../packages/mdc-grid-list/index';

function getFixture() {
return bel`
Expand Down
4 changes: 2 additions & 2 deletions test/unit/mdc-icon-button/mdc-icon-button-toggle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import {assert} from 'chai';

import {supportsCssVariables} from '../../../packages/mdc-ripple/util';
import {createMockRaf} from '../helpers/raf';
import {MDCIconButtonToggle, MDCIconButtonToggleFoundation} from '../../../packages/mdc-icon-button';
import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCIconButtonToggle, MDCIconButtonToggleFoundation} from '../../../packages/mdc-icon-button/index';
import {MDCRipple} from '../../../packages/mdc-ripple/index';
import {cssClasses} from '../../../packages/mdc-ripple/constants';

function getFixture() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-line-ripple/mdc-line-ripple.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {assert} from 'chai';
import td from 'testdouble';
import domEvents from 'dom-events';

import {MDCLineRipple, MDCLineRippleFoundation} from '../../../packages/mdc-line-ripple';
import {MDCLineRipple, MDCLineRippleFoundation} from '../../../packages/mdc-line-ripple/index';

const getFixture = () => bel`
<div class="mdc-line-ripple"></div>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-linear-progress/mdc-linear-progress.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import {assert} from 'chai';
import bel from 'bel';

import {MDCLinearProgress, MDCLinearProgressFoundation} from '../../../packages/mdc-linear-progress';
import {MDCLinearProgress, MDCLinearProgressFoundation} from '../../../packages/mdc-linear-progress/index';

function getFixture() {
return bel`
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-list/mdc-list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import {assert} from 'chai';
import td from 'testdouble';
import bel from 'bel';
import {MDCList, MDCListFoundation} from '../../../packages/mdc-list';
import {MDCList, MDCListFoundation} from '../../../packages/mdc-list/index';
import domEvents from 'dom-events';

function getFixture() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-menu/mdc-menu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import domEvents from 'dom-events';

import {MDCMenu, MDCMenuFoundation} from '../../../packages/mdc-menu/index';
import {Corner} from '../../../packages/mdc-menu-surface/constants';
import {MDCListFoundation} from '../../../packages/mdc-list';
import {MDCListFoundation} from '../../../packages/mdc-list/index';
import {MDCMenuSurfaceFoundation} from '../../../packages/mdc-menu-surface/foundation';

function getFixture(open) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-notched-outline/mdc-notched-outline.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import bel from 'bel';
import {assert} from 'chai';

import {MDCNotchedOutline} from '../../../packages/mdc-notched-outline';
import {MDCNotchedOutline} from '../../../packages/mdc-notched-outline/index';

const getFixture = () => bel`
<div class="mdc-notched-outline">
Expand Down
4 changes: 2 additions & 2 deletions test/unit/mdc-radio/mdc-radio.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import bel from 'bel';

import {supportsCssVariables} from '../../../packages/mdc-ripple/util';
import {createMockRaf} from '../helpers/raf';
import {MDCRadio, MDCRadioFoundation} from '../../../packages/mdc-radio';
import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCRadio, MDCRadioFoundation} from '../../../packages/mdc-radio/index';
import {MDCRipple} from '../../../packages/mdc-ripple/index';

const {NATIVE_CONTROL_SELECTOR} = MDCRadioFoundation.strings;

Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-ripple/mdc-ripple.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCRipple} from '../../../packages/mdc-ripple/index';
import {cssClasses} from '../../../packages/mdc-ripple/constants';
import * as util from '../../../packages/mdc-ripple/util';
import {createMockRaf} from '../helpers/raf';
Expand Down
6 changes: 3 additions & 3 deletions test/unit/mdc-select/mdc-select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import td from 'testdouble';
import {createMockRaf} from '../helpers/raf';
import {supportsCssVariables} from '../../../packages/mdc-ripple/util';

import {MDCRipple, MDCRippleFoundation} from '../../../packages/mdc-ripple';
import {MDCSelect} from '../../../packages/mdc-select';
import {MDCRipple, MDCRippleFoundation} from '../../../packages/mdc-ripple/index';
import {MDCSelect} from '../../../packages/mdc-select/index';
import {cssClasses} from '../../../packages/mdc-select/constants';
import {MDCNotchedOutline} from '../../../packages/mdc-notched-outline';
import {MDCNotchedOutline} from '../../../packages/mdc-notched-outline/index';

class FakeLabel {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-slider/foundation-pointer-events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import {assert} from 'chai';
import td from 'testdouble';

import {getCorrectEventName} from '../../../packages/mdc-animation';
import {getCorrectEventName} from '../../../packages/mdc-animation/index';

import {cssClasses} from '../../../packages/mdc-slider/constants';
import {TRANSFORM_PROP, setupEventTest as setupTest} from './helpers';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-slider/foundation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import {assert} from 'chai';
import td from 'testdouble';

import {getCorrectPropertyName} from '../../../packages/mdc-animation';
import {getCorrectPropertyName} from '../../../packages/mdc-animation/index';
import {verifyDefaultAdapter} from '../helpers/foundation';
import {createMockRaf} from '../helpers/raf';
import {setupFoundationTest} from '../helpers/setup';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-slider/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* THE SOFTWARE.
*/

import {getCorrectPropertyName} from '../../../packages/mdc-animation';
import {getCorrectPropertyName} from '../../../packages/mdc-animation/index';
import {captureHandlers} from '../helpers/foundation';
import {createMockRaf} from '../helpers/raf';
import {setupFoundationTest} from '../helpers/setup';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-slider/mdc-slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {createMockRaf} from '../helpers/raf';
import {TRANSFORM_PROP} from './helpers';

import {cssClasses, strings} from '../../../packages/mdc-slider/constants';
import {MDCSlider} from '../../../packages/mdc-slider';
import {MDCSlider} from '../../../packages/mdc-slider/index';

suite('MDCSlider');

Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-snackbar/mdc-snackbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import td from 'testdouble';
import domEvents from 'dom-events';

import {MDCSnackbar, MDCSnackbarFoundation} from '../../../packages/mdc-snackbar';
import {MDCSnackbar, MDCSnackbarFoundation} from '../../../packages/mdc-snackbar/index';

const {strings} = MDCSnackbarFoundation;

Expand Down
4 changes: 2 additions & 2 deletions test/unit/mdc-switch/mdc-switch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import td from 'testdouble';

import {supportsCssVariables} from '../../../packages/mdc-ripple/util';
import {createMockRaf} from '../helpers/raf';
import {MDCSwitchFoundation, MDCSwitch} from '../../../packages/mdc-switch';
import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCSwitchFoundation, MDCSwitch} from '../../../packages/mdc-switch/index';
import {MDCRipple} from '../../../packages/mdc-ripple/index';

const {NATIVE_CONTROL_SELECTOR, RIPPLE_SURFACE_SELECTOR} = MDCSwitchFoundation.strings;

Expand Down
4 changes: 2 additions & 2 deletions test/unit/mdc-tab-bar/mdc-tab-bar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import {assert} from 'chai';
import td from 'testdouble';
import domEvents from 'dom-events';

import {MDCTabBar, MDCTabBarFoundation} from '../../../packages/mdc-tab-bar';
import {MDCTabFoundation} from '../../../packages/mdc-tab';
import {MDCTabBar, MDCTabBarFoundation} from '../../../packages/mdc-tab-bar/index';
import {MDCTabFoundation} from '../../../packages/mdc-tab/index';

const getFixture = () => bel`
<div class="mdc-tab-bar">
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-tab-indicator/mdc-tab-indicator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
MDCSlidingTabIndicatorFoundation,
MDCFadingTabIndicatorFoundation,
MDCTabIndicatorFoundation,
} from '../../../packages/mdc-tab-indicator';
} from '../../../packages/mdc-tab-indicator/index';

const getFixture = () => bel`
<span class="mdc-tab-indicator">
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-tab-scroller/mdc-tab-scroller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
MDCTabScroller,
MDCTabScrollerFoundation,
util,
} from '../../../packages/mdc-tab-scroller';
} from '../../../packages/mdc-tab-scroller/index';

import MDCTabScrollerRTL from '../../../packages/mdc-tab-scroller/rtl-scroller';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-tab/mdc-tab.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import td from 'testdouble';
import domEvents from 'dom-events';

import {createMockRaf} from '../helpers/raf';
import {MDCTab, MDCTabFoundation} from '../../../packages/mdc-tab';
import {MDCTab, MDCTabFoundation} from '../../../packages/mdc-tab/index';

const getFixture = () => bel`
<button class="mdc-tab" aria-selected="false" role="tab">
Expand Down
3 changes: 1 addition & 2 deletions test/unit/mdc-tabs/mdc-tab-bar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ import {assert} from 'chai';
import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';
import {MDCTabBar} from '../../../packages/mdc-tabs/tab-bar';
import {MDCTabBarFoundation} from '../../../packages/mdc-tabs/tab-bar';
import {MDCTabBar, MDCTabBarFoundation} from '../../../packages/mdc-tabs/tab-bar/index';
import {strings} from '../../../packages/mdc-tabs/tab-bar/constants';
import {strings as tabStrings} from '../../../packages/mdc-tabs/tab/constants';
import {createMockRaf} from '../helpers/raf';
Expand Down
3 changes: 1 addition & 2 deletions test/unit/mdc-tabs/mdc-tab.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import domEvents from 'dom-events';
import td from 'testdouble';
import {createMockRaf} from '../helpers/raf';
import {supportsCssVariables} from '../../../packages/mdc-ripple/util';
import {MDCTab} from '../../../packages/mdc-tabs/tab';
import {MDCTabFoundation} from '../../../packages/mdc-tabs/tab';
import {MDCTab, MDCTabFoundation} from '../../../packages/mdc-tabs/tab/index';
import {cssClasses, strings} from '../../../packages/mdc-tabs/tab/constants';

function getFixture() {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-textfield/mdc-text-field-icon.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {assert} from 'chai';
import td from 'testdouble';
import domEvents from 'dom-events';

import {MDCTextFieldIcon, MDCTextFieldIconFoundation} from '../../../packages/mdc-textfield/icon';
import {MDCTextFieldIcon, MDCTextFieldIconFoundation} from '../../../packages/mdc-textfield/icon/index';

const getFixture = () => bel`
<div class="mdc-text-field__icon"></div>
Expand Down
10 changes: 5 additions & 5 deletions test/unit/mdc-textfield/mdc-text-field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import domEvents from 'dom-events';
import td from 'testdouble';
import {assert} from 'chai';

import {MDCRipple} from '../../../packages/mdc-ripple';
import {MDCLineRipple} from '../../../packages/mdc-line-ripple';
import {MDCFloatingLabel} from '../../../packages/mdc-floating-label';
import {MDCNotchedOutline} from '../../../packages/mdc-notched-outline';
import {MDCRipple} from '../../../packages/mdc-ripple/index';
import {MDCLineRipple} from '../../../packages/mdc-line-ripple/index';
import {MDCFloatingLabel} from '../../../packages/mdc-floating-label/index';
import {MDCNotchedOutline} from '../../../packages/mdc-notched-outline/index';
import {MDCTextField, MDCTextFieldFoundation, MDCTextFieldHelperText,
MDCTextFieldIcon} from '../../../packages/mdc-textfield';
MDCTextFieldIcon} from '../../../packages/mdc-textfield/index';

const {cssClasses} = MDCTextFieldFoundation;

Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-toolbar/mdc-toolbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import domEvents from 'dom-events';
import td from 'testdouble';

import {strings} from '../../../packages/mdc-toolbar/constants';
import {MDCToolbar} from '../../../packages/mdc-toolbar';
import {MDCToolbar} from '../../../packages/mdc-toolbar/index';

function getFixture() {
return bel`
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-top-app-bar/mdc-top-app-bar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import bel from 'bel';
import domEvents from 'dom-events';
import td from 'testdouble';

import {MDCTopAppBar} from '../../../packages/mdc-top-app-bar';
import {MDCTopAppBar} from '../../../packages/mdc-top-app-bar/index';
import {strings} from '../../../packages/mdc-top-app-bar/constants';
import MDCTopAppBarFoundation from '../../../packages/mdc-top-app-bar/foundation';
import MDCFixedTopAppBarFoundation from '../../../packages/mdc-top-app-bar/fixed/foundation';
Expand Down
Empty file.

0 comments on commit cc1ee56

Please sign in to comment.