🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@technologiestiftung/stadtpuls-test-utils

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@technologiestiftung/stadtpuls-test-utils

shared test utilities for the stadtpuls project

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
6
Created
Source

Version Documentation Maintenance License: MIT

Welcome to stadtpuls-test-utils

This repo contains shared test utilities for the stadtpuls project.

Prerequisites

  • node >=14

Install

npm i @technologiestiftung/stadtpuls-test-utils

Usage

Commonjs

//@ts-check
const {
  closePool,
  openPool,
  getClient,
  execQuery,
} = require("@technologiestiftung/stadtpuls-test-utils");

async function main() {
  await openPool("postgres://postgres:postgres@localhost:5432/postgres");
  const client = await getClient();
  await client.query(
    "CREATE TABLE IF NOT EXISTS test (id serial PRIMARY KEY, name varchar(255))"
  );
  await client.query("INSERT INTO test (name) VALUES ($1)", ["foo"]);
  const result = await client.query("SELECT * FROM test", []);
  // @ts-ignore
  console.log(result.rows);
  await closePool();
}
main().catch(console.error);

Typescript & ESM

import {
  closePool,
  openPool,
  getClient,
  execQuery,
} from "@technologiestiftung/stadtpuls-test-utils";

async function main() {
  await openPool("postgres://postgres:postgres@localhost:5432/postgres");
  const client = await getClient();
  await client.query(
    "CREATE TABLE IF NOT EXISTS test (id serial PRIMARY KEY, name varchar(255))"
  );
  await client.query("INSERT INTO test (name) VALUES ($1)", ["foo"]);
  const result = await client.query("SELECT * FROM test", []);
  // @ts-ignore
  console.log(result.rows);
  await closePool();
}
main().catch(console.error);

Run tests

npm test

Maintainers

License

Copyright © 2022 Technologiestiftung Berlin & Fabian Morón Zirfas.
This project is MIT licensed.

Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Contributors

Thanks goes to these wonderful people (emoji key):


Fabian Morón Zirfas

💻 📖 🎨

Lucas Vogel

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits



A project by:

Supported by:

Keywords

stadtpuls

FAQs

Package last updated on 11 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts