Getting Started
The Journey of a Thousand Miles Starts with a Single Step
To get started, it's best to download the nightly version of AssemblyScript
. The following bash script should help get you started.
The following files will be created in your project.
๐ assembly
๐ __tests__
๐งพ as-pect.d.ts
๐งพ example.spec.ts
๐งพ index.ts
๐งพ tsconfig.json
๐ build
โ .gitignore
๐ node_modules
๐ tests
๐งพ index.js
๐งพ asconfig.json
๐งพ as-pect.asconfig.json
๐งพ as-pect.config.js
๐งพ index.js
๐งพ package-lock.json
๐งพ package.json
Some of the testing files generated by the assemblyscript
package are unnecessary like the root ๐ tests
folder which can be deleted. Also, the ๐งพ example.spec.ts
file can be deleted because it's merely an example set of tests to help you get started.
The ๐งพ as-pect.d.ts file is very simple. It contains a reference to the as-pect
default types for intellisense reasons.
To run your as-pect
test suite, use the command line: npx asp
, or create an npm script.
The command line defaults to using ./as-pect.config.js
, otherwise you can specify some the configuration options using the command line interface.
To change the location of the as-pect configuration, use the --config
option.
It's also important to inspect the `./as-pect.asconfig.json` file, as it has all the required cli options for testing.
Then all you need to do is write some tests!
Try your best to logically group tests into describe
blocks so things can stay organized.
Last updated
Was this helpful?