diff options
author | 2021-04-06 16:14:42 -0400 | |
---|---|---|
committer | 2021-04-06 16:14:42 -0400 | |
commit | 72d9ece6db9cd57c865108b5fad43cbd5728e204 (patch) | |
tree | fe9f3ada071ece00c642dba162779796b0be1da3 /test/astro-expr.test.js | |
parent | 7240f0d67737da3c003455d4ebed6faa5be8c118 (diff) | |
download | astro-72d9ece6db9cd57c865108b5fad43cbd5728e204.tar.gz astro-72d9ece6db9cd57c865108b5fad43cbd5728e204.tar.zst astro-72d9ece6db9cd57c865108b5fad43cbd5728e204.zip |
Compiler cleanup (#64)
* Compiler cleanup
This is general compiler cleanup, especially around the codegen part. Goals here were too:
1. Make it possible to compile HTML recursively (needed for future astro-in-expressions work) by moving that work into its own function.
1. Get rid of collectionItems and have compiling the HTML return just a source string.
Also not planned, this change gets rid of the different between components and pages. All Astro components compile to the same JavaScript.
* Remove unused node types
Diffstat (limited to 'test/astro-expr.test.js')
-rw-r--r-- | test/astro-expr.test.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/astro-expr.test.js b/test/astro-expr.test.js new file mode 100644 index 000000000..c9aa414dd --- /dev/null +++ b/test/astro-expr.test.js @@ -0,0 +1,18 @@ +import { suite } from 'uvu'; +import * as assert from 'uvu/assert'; +import { doc } from './test-utils.js'; +import { setup } from './helpers.js'; + +const Expressions = suite('Expressions'); + +setup(Expressions, './fixtures/astro-expr'); + +Expressions('Can load page', async ({ runtime }) => { + const result = await runtime.load('/'); + + console.log(result) + assert.equal(result.statusCode, 200); + console.log(result.contents); +}); + +Expressions.run(); |