Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

cloudspec-dev/deno-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno CloudSpec AWS CDK Proof of Concept

This is a proof of concept for a Deno based cloudspec project. This will deploy an AWS CDK stack as part of the test and make expectations on the stack outputs. It's using the Deno testing capabilities.

Nb: As stated above, that's a POC and nothing I'd recommend using at the moment.

Motivation

Trying to find a streamlined experience for end2end testing, without having to deal with cumbersome test setup. Essentially aiming for a single command which works without much (any?) config. Deno became quite an attractive contender recently by adding direct support for NPM packges.

While that's still focused on Typescript as a language, I could imagine this would be an acceptable workflow for other jsii languages as well, since it's pretty much effortless and zero config. But that's something for another experiment.

Prerequisites

You'll need to have Deno installed

Examples

Inline Deno

This test demonstrates that it's possible to use AWS CDK inline in Deno tests.

deno test --no-check --allow-all ./examples/inline

Embedded into Node Project

This test demonstrates that it's possible to use Deno inside an Typescript / Node AWS CDK application. The way to make it work is to use an import_map to map the NPM packages. Potentially, this import map could be auto generated based on a package.json file to allow seamless test runs alongside an otherwise node based project.

deno test --no-check --allow-all --import-map ./examples/node/import_map.json ./examples/node