Comments (7)
tests from appsync-simulator-test-example
are passing, yes:
set@set-home ~/www/cloudbeds/appsync-serverless-emulator-example $ npm test
> [email protected] test /home/set/www/cloudbeds/appsync-serverless-emulator-example
> jest --detectOpenHandles
console.warn node_modules/ascoltatori/node_modules/node-uuid/uuid.js:48
[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()
PASS __test__/graphql.test.js (18.644s)
graphql
✓ None & Lambda examples (418ms)
✓ subscription / mutation / dynamodb (196ms)
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 19.46s, estimated 20s
Ran all test suites.
However when I'm was trying to run tests from my project I was getting few errors without any description. Wrapping state.server = await create();
in try/catch with output of error message in console would save many time for me. This is what this issue about.
from aws-utils.
@SET001, due to the current implementation of the dynamo emulator, which uses the slow to boot JVM, I have found that the initial run of tests fail, and the second run of tests will succeed. We are looking into using nailgun.
To be clear -- are tests passing for you?
from aws-utils.
@cbaron is it possible to run local dynamo server and use it for each subsequent tests runs, instead of rerun dymano emulator each time?
from aws-utils.
@SET001 -- its possible, but we prefer to utilize a separate instance for each set of unit tests so that they can run in parallel in jest without interfering with one another.
from aws-utils.
its possible
how is it possible? any example?
but we prefer to utilize a separate instance for each
are there any reason you call those tests a unit
? an't they integration by the nature?
from aws-utils.
@SET001 You are welcome to write your own test implementation which calls create
once. Certainly, we will take your request in consideration.
are there any reason you call those tests a unit? an't they integration by the nature?
Not exactly sure what you're asking. At the moment, I refer to an it
block as a unit test. Currently, our organization prefers to write unit tests wherein a server can be spun up, then destroyed for a block of unit tests so that many blocks of unit tests can run in parallel at the same time without collisions.
from aws-utils.
@cbaron is it possible to run local dynamo server and use it for each subsequent tests runs, instead of rerun dymano emulator each time?
My mistake, you'll notice here that the same dynamo server is used across all test runs.
from aws-utils.
Related Issues (20)
- Cannot find function config for function : undefined HOT 1
- Failure trying to run tests HOT 3
- ValueMapper: JavaString HOT 2
- Feature request: Aurora (RDS) Serverless support HOT 1
- AppSync Emulator - Support Condition Expressions
- AppSync Emulator - Support $context.stash
- appsync emulator resultItems mapping template example does not work in AWS
- [appsync-emulator-serverless] Does not respect multiple appsSync API's in config HOT 2
- AppSync Emulator - Support RegEx in string split
- Cannot Install on Windows HOT 1
- [appsync-emulator-serverless] Conflicting peer dependencies
- Bug with getting PID by port HOT 9
- Lambda datasource docker HOT 12
- Emulator does not throw error when AppSync does
- AppSync Emulator - AWSEmail and AWSURL HOT 1
- Incorrect string equality in VTL templates HOT 1
- Unable to Invoke lambda function HOT 2
- Mismatch between AWSJSON and AppSync
- Assertions within createSchema method prevent DynamoDB from being null HOT 1
- Incorrect $util.isNullOrEmpty check in appsynce-emulator HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-utils.