Skip to content

Commit

Permalink
chore: finally remove given (#1321)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Jul 29, 2024
1 parent 1f0b334 commit d72b287
Show file tree
Hide file tree
Showing 9 changed files with 1,822 additions and 1,663 deletions.
8 changes: 4 additions & 4 deletions functional_tests/feature-flags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ describe('FunctionalTests / Feature Flags', () => {
resetRequests(token)

// wait for decide callback
await new Promise((res) => setTimeout(res, 500))
await new Promise<void>((resolve: () => void) => setTimeout(resolve, 500))

// Person properties set here should also be sent to the decide endpoint.
posthog.identify('test-id', {
email: '[email protected]',
})

await new Promise((res) => setTimeout(res, 500))
await new Promise((resolve: () => void) => setTimeout(resolve, 500))

await waitFor(() => {
expect(getRequests(token)['/decide/']).toEqual([
Expand Down Expand Up @@ -72,7 +72,7 @@ describe('FunctionalTests / Feature Flags', () => {

// wait for decide callback
// eslint-disable-next-line compat/compat
await new Promise((res) => setTimeout(res, 500))
await new Promise((resolve: () => void) => setTimeout(resolve, 500))

// First we identify with a new distinct_id but with no properties set
posthog.identify('test-id')
Expand Down Expand Up @@ -140,7 +140,7 @@ describe('FunctionalTests / Feature Flags', () => {

// wait for decide callback
// eslint-disable-next-line compat/compat
await new Promise((res) => setTimeout(res, 500))
await new Promise((resolve: () => void) => setTimeout(resolve, 500))

// now second call should've fired
await waitFor(() => {
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// eslint-disable-next-line no-undef
module.exports = {
testPathIgnorePatterns: ['/node_modules/', '/cypress/', '/react/', '/test_data/', '/testcafe/'],
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
setupFilesAfterEnv: ['given2/setup', './src/__tests__/setup.js'],
setupFilesAfterEnv: ['./src/__tests__/setup.js'],
modulePathIgnorePatterns: ['src/__tests__/setup.js', 'src/__tests__/helpers/'],
clearMocks: true,
testEnvironment: 'jsdom',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"eslint-plugin-react-hooks": "^4.6.0",
"express": "^4.18.2",
"fast-check": "^2.17.0",
"given2": "^2.1.7",
"husky": "^8.0.1",
"jest": "^27.5.1",
"jsdom": "16.5.0",
Expand Down
7 changes: 0 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

241 changes: 0 additions & 241 deletions src/__tests__/decide.js

This file was deleted.

Loading

0 comments on commit d72b287

Please sign in to comment.