diff options
author | 2024-03-26 13:43:04 -0400 | |
---|---|---|
committer | 2024-03-26 13:43:04 -0400 | |
commit | b5a80405b93a166f6f019209152b860ffe2f73ef (patch) | |
tree | d5bf0a6d842dfaa29b00dbfe3e9aacfe6beeb4b3 /packages/db/test/basics.test.js | |
parent | 5f7e9c47e01116f6ec74b33770f480404680956a (diff) | |
download | astro-b5a80405b93a166f6f019209152b860ffe2f73ef.tar.gz astro-b5a80405b93a166f6f019209152b860ffe2f73ef.tar.zst astro-b5a80405b93a166f6f019209152b860ffe2f73ef.zip |
Fix `db.run()` type signature in production (#10566)
* deps: bump drizzle to latest patch
* chore: changeset
* feat(test): db.run output
Diffstat (limited to 'packages/db/test/basics.test.js')
-rw-r--r-- | packages/db/test/basics.test.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/packages/db/test/basics.test.js b/packages/db/test/basics.test.js index 4fe9541fa..348e9066c 100644 --- a/packages/db/test/basics.test.js +++ b/packages/db/test/basics.test.js @@ -73,6 +73,23 @@ describe('astro:db', () => { expect($('.session-id').text()).to.equal('12345'); expect($('.username').text()).to.equal('Mario'); }); + + it('Prints authors from raw sql call', async () => { + const json = await fixture.fetch('run.json').then((res) => res.json()); + expect(json).to.deep.equal({ + columns: ['_id', 'name', 'age2'], + columnTypes: ['INTEGER', 'TEXT', 'INTEGER'], + rows: [ + [1, 'Ben', null], + [2, 'Nate', null], + [3, 'Erika', null], + [4, 'Bjorn', null], + [5, 'Sarah', null], + ], + rowsAffected: 0, + lastInsertRowid: null, + }); + }); }); describe('development --remote', () => { @@ -137,6 +154,23 @@ describe('astro:db', () => { expect($('.session-id').text()).to.equal('12345'); expect($('.username').text()).to.equal('Mario'); }); + + it('Prints authors from raw sql call', async () => { + const json = await fixture.fetch('run.json').then((res) => res.json()); + expect(json).to.deep.equal({ + columns: ['_id', 'name', 'age2'], + columnTypes: ['INTEGER', 'TEXT', 'INTEGER'], + rows: [ + [1, 'Ben', null], + [2, 'Nate', null], + [3, 'Erika', null], + [4, 'Bjorn', null], + [5, 'Sarah', null], + ], + rowsAffected: 0, + lastInsertRowid: null, + }); + }); }); describe('build --remote', () => { |