Files
formbricks/packages/js/babel.config.js
Shubham Palriwala d67858e2ea Add tests to formbricks-js (#399)
* init: jest for formbricks/js

* test: formbricks init

* test: formbricks set attributes

* test: formbricks updated attributes

* test: formbricks track, refresh, route change

* test: formbricks logout

* chore: use strict checking & replace let w const

* chore: destructure variables

* feat: test coverage visibility

* updated: pnpm lock file

* feat: tests now use a mock API

* fix: mock actual formbricks survey response and not empty placeholders

* rename: unit test for clarity

* chore: destructure setting attributes into individual tests

* feat: mock console logger for cleaner cli during tests

* add top level test script for turbo

* update babel config to fix errors in formbricks-js build

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-30 16:29:38 +02:00

7 lines
257 B
JavaScript

module.exports = (api) => {
return {
presets: [["@babel/preset-env", { targets: { node: "current" } }], "@babel/preset-typescript"],
plugins: [["@babel/plugin-transform-react-jsx", { runtime: api.env("test") ? "automatic" : "classic" }]],
};
};