Giter Site home page Giter Site logo

sweepai-dev / jest-opentelemetry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from traceloop/jest-opentelemetry

0.0 0.0 0.0 3.34 MB

Easily run integration tests for your backends

Home Page: https://www.traceloop.com

License: Apache License 2.0

Shell 0.03% JavaScript 83.59% TypeScript 16.07% Dockerfile 0.31%

jest-opentelemetry's People

Contributors

dependabot[bot] avatar galkleinman avatar handotdev avatar nirga avatar tomer-friedman avatar

jest-opentelemetry's Issues

Sweep: ๐Ÿš€ Feature: Partial Postgres queries assertions

๐Ÿ”– Feature description

Our Postgres assertions can only validate exact queries.
So, for example, you can validate that a query like INSERT INTO users(email) VALUES ([email protected]).
The downside of this is that you need to specify the exact query that was made on the database.

But usually, you don't really want to validate the entire query syntax, you just want to validate that some fields were added to the table, but you don't care about the others.

This feature should allow writing an assertion like

expectTrace(traceloop)
  .toQueryPostgresSQL()
  .withPartialQuery(
    `INSERT INTO users(email) VALUES ([email protected])`

And it will succeed even if the actual query was
INSERT INTO users(name, request_id, email) VALUES (bla, 5934345, [email protected])

๐ŸŽค Why is this feature needed ?

Our goal with this project is to make end-to-end tests easier. Being able to write simple assertions Is core to this.

โœŒ๏ธ How do you aim to achieve this?

We will need to use some Typescript SQL parser to parse and compare the asserted and actual SQL queries.

๐Ÿ”„๏ธ Additional Information

No response

๐Ÿ‘€ Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.