Skip to content

Commit

Permalink
omg our tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 27, 2023
1 parent f17e992 commit e93a903
Show file tree
Hide file tree
Showing 33 changed files with 1,034 additions and 993 deletions.
13 changes: 13 additions & 0 deletions src/__tests__/__snapshots__/posthog-core.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ Array [
],
]
`;

exports[`posthog core __compress_and_send_json_request handles base64 compression 1`] = `
Array [
Array [
"/e/",
Object {
"data": "eyJsYXJnZV9rZXkiOiJhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNh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YmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmNhYmMifQ==",
},
undefined,
[MockFunction],
],
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
ErrorProperties,
unhandledRejectionToProperties,
} from '../../../extensions/exception-autocapture/error-conversion'
import { _isNull } from '../../../utils'

import { _isNull } from '../../../type-utils'

// ugh, jest
// can't reference PromiseRejectionEvent to construct it 🤷
Expand Down
3 changes: 2 additions & 1 deletion src/__tests__/gdpr-utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import sinon from 'sinon'

import * as gdpr from '../gdpr-utils'
import { _isNull } from '../utils'

import { _isNull } from '../type-utils'

const TOKENS = [
`test-token`,
Expand Down
Loading

0 comments on commit e93a903

Please sign in to comment.