Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions packages/aws-amplify/__tests__/exports-test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import * as exported from '../src';

describe('aws-amplify', () => {
describe('import * keys', () => {
it('should match snapshot', () => {
expect(Object.keys(exported)).toMatchInlineSnapshot(`
Array [
"Amplify",
"Analytics",
"AWSPinpointProvider",
"AWSKinesisProvider",
"AWSKinesisFirehoseProvider",
"AmazonPersonalizeProvider",
"Auth",
"Storage",
"StorageClass",
"API",
"APIClass",
"graphqlOperation",
"DataStore",
"Predicates",
"PubSub",
"Cache",
"Interactions",
"a",
"button",
"signInButton",
"googleSignInButton",
"signInButtonIcon",
"auth0SignInButton",
"facebookSignInButton",
"amazonSignInButton",
"oAuthSignInButton",
"signInButtonContent",
"formContainer",
"formSection",
"formField",
"formRow",
"hint",
"input",
"inputLabel",
"label",
"radio",
"navBar",
"navRight",
"nav",
"navItem",
"photoPickerButton",
"photoPlaceholder",
"photoPlaceholderIcon",
"container",
"actionRow",
"sectionHeader",
"sectionHeaderHint",
"sectionBody",
"sectionHeaderContent",
"sectionFooter",
"sectionFooterPrimaryContent",
"sectionFooterSecondaryContent",
"selectInput",
"strike",
"strikeContent",
"toast",
"toastClose",
"totpQrcode",
"sumerianSceneContainer",
"sumerianScene",
"loadingOverlay",
"loadingContainer",
"loadingLogo",
"loadingSceneName",
"loadingBar",
"loadingBarFill",
"sceneErrorText",
"sceneBar",
"sceneName",
"sceneActions",
"actionButton",
"tooltip",
"actionIcon",
"autoShowTooltip",
"XR",
"Predictions",
"Logger",
"Hub",
"JS",
"ClientDevice",
"Signer",
"I18n",
"ServiceWorker",
"default",
]
`);
});
});
});
42 changes: 42 additions & 0 deletions packages/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,47 @@
"@aws-amplify/storage": "^3.1.6",
"@aws-amplify/ui": "^2.0.2",
"@aws-amplify/xr": "^2.1.6"
},
"jest": {

@ericclemmons ericclemmons Apr 15, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Borrowed this config from @aws-amplify/auth.

"globals": {
"ts-jest": {
"diagnostics": false,
"tsConfig": {
"lib": [
"es5",
"es2015",
"dom",
"esnext.asynciterable",
"es2017.object"
],
"allowJs": true
}
}
},
"transform": {
"^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
},
"preset": "ts-jest",
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json",
"jsx"
],
"testEnvironment": "jsdom",
"testURL": "http://localhost/",
"coverageThreshold": {
"global": {
"branches": 0,
"functions": 0,
"lines": 0,
"statements": 0
}
},
"coveragePathIgnorePatterns": [
"/node_modules/"
]
}
}
1 change: 1 addition & 0 deletions packages/aws-amplify/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export {
export { Auth } from '@aws-amplify/auth';
export { Storage, StorageClass } from '@aws-amplify/storage';
export { API, APIClass, graphqlOperation } from '@aws-amplify/api';
export { DataStore, Predicates } from '@aws-amplify/datastore';
export { PubSub } from '@aws-amplify/pubsub';
export { default as Cache } from '@aws-amplify/cache';
export { Interactions } from '@aws-amplify/interactions';
Expand Down