Skip to content

Commit

Permalink
Merge pull request #235 from hans-lizihan/move-to-vitest
Browse files Browse the repository at this point in the history
move to vitest
  • Loading branch information
hans-lizihan authored Jul 3, 2024
2 parents d304d85 + 0013160 commit 261a98b
Show file tree
Hide file tree
Showing 15 changed files with 3,749 additions and 6,451 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm test -- run --coverage
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
coverage

# ide files
.idea
Expand Down
4 changes: 2 additions & 2 deletions lib/people.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ class MixpanelPeople extends ProfileHelpers() {
*/
track_charge(distinct_id, amount, properties, modifiers, callback) {
if (typeof(properties) === 'function' || !properties) {
callback = properties || function() {};
callback = properties || undefined;
properties = {};
} else {
if (typeof(modifiers) === 'function' || !modifiers) {
callback = modifiers || function() {};
callback = modifiers || undefined;
if (properties.$ignore_time || properties.hasOwnProperty("$ip")) {
modifiers = {};
Object.keys(properties).forEach(function(key) {
Expand Down
Loading

0 comments on commit 261a98b

Please sign in to comment.