question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion: asserts

See original GitHub issue

In testing we originally had two methods assert and assertEqual

but at some point I (somewhat thoughtlessly) suggested that we mirror the Node API. So we have things like assert.equal as well as assertEqual.

What do people think? I kinda like assertEqual as it’s less to type and I imagine the tab completion is better in VS Code.

Obviously we should do one or the other but not both.

(Related: I’d really like to have https://github.com/bokuweb/deno-pretty-assert in core… cc @bokuweb)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
thysultancommented, Feb 18, 2019

@keroxp Object.defineProperty can make the property non-writable/configurable but being able to monkey patch can be considered a plus in some cases.

There’s also the option of:

import * as assert from 'assert'

assert.equal(...)
1reaction
haydcommented, Mar 5, 2019

#227 seems to be resolution of this discussion… ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Types of Assertion
Basic Assertion. Simple expression of standing up for personal rights, beliefs, feelings or opinions. Example: When being interrupted, "Excuse me, ...
Read more >
Assertion - Definition, Meaning & Synonyms - Vocabulary.com
An assertion is a declaration that's made emphatically, especially as part of an argument or as if it's to be understood as a...
Read more >
Synonyms of assert - Merriam-Webster Thesaurus
Synonyms for ASSERT: declare, affirm, proclaim, profess, say, announce, guarantee, explain; Antonyms of ASSERT: minimize, ignore, disregard, understate, ...
Read more >
Assertion - Wikipedia
Logical assertion, a statement that asserts that a certain premise is true · Proof by assertion, an informal fallacy in which a proposition...
Read more >
Asserting political opinions in discussion - Instructional Moves
In this video, Christina “V” Villarreal and Tim McCarthy reflect on when and why they choose to assert certain political positions or strongly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found