Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/test dedupe #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add a couple tests to show what I'm talking about
Justin committed Jan 16, 2024
commit 622b72fddc946e7698f04778f3b71697d240e0c5
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.idea
.df-credentials.json
node_modules/

.DS_Store
.DS_Store
4 changes: 1 addition & 3 deletions includes/deduplicate.js
Original file line number Diff line number Diff line change
@@ -18,6 +18,4 @@ function deduplicate(relation, partition_by, order_by, incremental) {
}


module.exports = {
deduplicate
}
module.exports = deduplicate
8 changes: 8 additions & 0 deletions includes/deduplicate.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { deduplicate } = require('../')

describe('deduplicate', () => {
it('works better as an exported function than as an object', () => {
const deduped = deduplicate('relation', 'partition_by', 'order_by', 'incremental')
expect(deduped).toBeTruthy()
})
})
7 changes: 7 additions & 0 deletions includes/group_by.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { group_by } = require('../')

describe('group_by', () => {
it('is awkward to import this one', () => {
expect(group_by.group_by(0, [])).toEqual('group by ')
})
})
6,328 changes: 6,320 additions & 8 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"scripts": {
"test": "jest",
"test.watch": "jest --watch"
},
"dependencies": {
"@dataform/core": "^2.7.0"
},
"devDependencies": {
"jest": "^29.7.0"
}
}