Skip to content

chore: cleanup re count#1587

Open
sjvans wants to merge 3 commits into
mainfrom
count
Open

chore: cleanup re count#1587
sjvans wants to merge 3 commits into
mainfrom
count

Conversation

@sjvans
Copy link
Copy Markdown
Contributor

@sjvans sjvans commented Apr 28, 2026

  • make count checks type agnostic
  • i couldn't find _counted_ anywhere

sjvans and others added 2 commits April 28, 2026 20:18
Co-authored-by: Copilot <copilot@github.com>
@sjvans sjvans marked this pull request as ready for review April 28, 2026 18:58
Copy link
Copy Markdown
Contributor

@danjoa danjoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
See inline comments

)
expect(res.status).to.be.eq(200)
expect(res.data['@odata.count']).to.be.eq(1)
expect(res.data['@odata.count'] == 1).to.be.eq(true)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(res.data['@odata.count'] == 1).to.be.eq(true)
expect(res.data['@odata.count']).eqls(1)

query.SELECT.count = true
const result = await query
assert.strictEqual(result.$count, 1)
assert.strictEqual(Number(result.$count), 1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert.strictEqual(Number(result.$count), 1)
assert.equal(result.$count, 1)

assert.strictEqual(Number(result.$count), 1)
const renamed = result.map(row => ({ key: row.ID, fullName: row.name }))
assert.strictEqual(renamed.$count, 1)
assert.strictEqual(Number(renamed.$count), 1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert.strictEqual(Number(renamed.$count), 1)
assert.equal(renamed.$count, 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants