forked from aws-amplify/amplify-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_without_auth.test.ts
29 lines (26 loc) · 1.21 KB
/
data_without_auth.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { it } from 'node:test';
import {
assertExpectedLogicalIds,
synthesizeBackendTemplates,
} from '../define_backend_template_harness.js';
import { dataWithoutAuth } from '../test-projects/standalone-data-auth-modes/amplify/test_factories.js';
/**
* This test suite is meant to provide a fast feedback loop to sanity check that different feature verticals are working properly together.
* Specific feature configurations should be checked at the unit test level.
* Some assertions about how feature verticals interact could be appropriate here.
* Critical path interactions should be exercised in a full e2e test.
*/
void it('data without auth with lambda auth mode', () => {
const templates = synthesizeBackendTemplates(dataWithoutAuth);
assertExpectedLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [
'data7552DF31',
'function1351588B',
]);
assertExpectedLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [
'amplifyDataGraphQLAPI42A6FA33',
]);
assertExpectedLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [
'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833',
'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56',
]);
});