Skip to content

Commit

Permalink
🔨 Add check script
Browse files Browse the repository at this point in the history
  • Loading branch information
homostellaris committed Nov 5, 2024
1 parent c8973a2 commit 7fd51e7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run lint
- run: npm run check
- run: npm run build
env:
CONVEX_DEPLOYMENT: ${{ vars.CONVEX_DEPLOYMENT }}
Expand Down
12 changes: 6 additions & 6 deletions components/common/order.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ describe('starMudder', () => {
describe('calculateReorderIndices', () => {
describe('moving todo down', () => {
test('from index 1 to 3', () => {
expect(calculateReorderIndices(1, 3, 6)).toEqual([3, 4])
expect(calculateReorderIndices(1, 3)).toEqual([3, 4])
})

test('from index 0 to 1', () => {
expect(calculateReorderIndices(0, 1, 6)).toEqual([1, 2])
expect(calculateReorderIndices(0, 1)).toEqual([1, 2])
})

test('from index 3 to 5', () => {
expect(calculateReorderIndices(3, 5, 6)).toEqual([5, 6])
expect(calculateReorderIndices(3, 5)).toEqual([5, 6])
})
})

describe('moving todo up', () => {
test('from index 3 to 1', () => {
expect(calculateReorderIndices(3, 1, 6)).toEqual([0, 1])
expect(calculateReorderIndices(3, 1)).toEqual([0, 1])
})

test('from index 1 to 0', () => {
expect(calculateReorderIndices(1, 0, 6)).toEqual([-1, 0])
expect(calculateReorderIndices(1, 0)).toEqual([-1, 0])
})

test('from index 5 to 3', () => {
expect(calculateReorderIndices(5, 3, 6)).toEqual([2, 3])
expect(calculateReorderIndices(5, 3)).toEqual([2, 3])
})
})
})
4 changes: 2 additions & 2 deletions cypress/e2e/spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ it('works', () => {

assertLists(
[],
['take the bins out', 'be silly together', 'plan birthday day out'],
['plan birthday day out', 'be silly together', 'take the bins out'],
[],
)

Expand Down Expand Up @@ -136,7 +136,7 @@ it('works', () => {

assertLists(
['take the bins out'],
['be silly together', 'plan birthday day out'],
['plan birthday day out', 'be silly together'],
[],
)
})
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"scripts": {
"android:dev": "next build && cap sync && mv out/home.html out/index.html && cap run android",
"build": "convex codegen --typecheck=disable && next build",
"check": "npm run type-check && npm run lint && npm run test",
"convex:dev": "convex dev --typecheck=disable",
"convex:deploy": "convex deploy --typecheck=disable",
"next:dev": "next dev -p 6603",
Expand Down

0 comments on commit 7fd51e7

Please sign in to comment.