Socket
Socket
Sign inDemoInstall

slonik

Package Overview
Dependencies
Maintainers
1
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slonik - npm Package Compare versions

Comparing version 40.2.0 to 40.2.1

26

dist/helpers.test/createIntegrationTests.js

@@ -33,2 +33,28 @@ "use strict";

const createIntegrationTests = (test, driverFactory) => {
test('streams data', async (t) => {
const pool = await (0, __1.createPool)(t.context.dsn, {
driverFactory,
maximumPoolSize: 1,
});
const onData = sinon.spy();
await Promise.all([
pool.stream(__1.sql.unsafe `SELECT * FROM (VALUES (1), (2)) as t(id)`, (stream) => {
stream.on('data', onData);
}),
]);
t.true(onData.calledTwice);
t.deepEqual(onData.firstCall.args, [
{
data: {
id: 1,
},
fields: [
{
dataTypeId: 23,
name: 'id',
},
],
},
]);
});
test('inserts and retrieves bigint', async (t) => {

@@ -35,0 +61,0 @@ const pool = await (0, __1.createPool)(t.context.dsn, {

2

package.json

@@ -97,3 +97,3 @@ {

"types": "./dist/index.d.ts",
"version": "40.2.0"
"version": "40.2.1"
}

@@ -34,2 +34,36 @@ /* eslint-disable id-length */

) => {
test('streams data', async (t) => {
const pool = await createPool(t.context.dsn, {
driverFactory,
maximumPoolSize: 1,
});
const onData = sinon.spy();
await Promise.all([
pool.stream(
sql.unsafe`SELECT * FROM (VALUES (1), (2)) as t(id)`,
(stream) => {
stream.on('data', onData);
},
),
]);
t.true(onData.calledTwice);
t.deepEqual(onData.firstCall.args, [
{
data: {
id: 1,
},
fields: [
{
dataTypeId: 23,
name: 'id',
},
],
},
]);
});
test('inserts and retrieves bigint', async (t) => {

@@ -36,0 +70,0 @@ const pool = await createPool(t.context.dsn, {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc