Skip to content

Commit

Permalink
fix(aws-amplify): add DataStore export (#5421)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons authored Apr 20, 2020
1 parent 45ce88b commit 7cab470
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 0 deletions.
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": {
"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

0 comments on commit 7cab470

Please sign in to comment.