
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
assert-order
Advanced tools
[![NPM version][npm-image]][npm-url] [![NPM downloads][downloads-image]][downloads-url] [![Build status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [
function foo() {
o.once(1)
}
foo()
foo() // throws
import { AssertOrder } from 'assert-order'
const o = new AssertOrder()
function foo() {
o.once(1)
}
function boo() {
o.once(2)
}
foo()
boo()
Assert step step
have executed at least once.
import { AssertOrder } from 'assert-order'
const o = new AssertOrder()
for (let i = 0; i < 10; i++)
o.atLeastOnce(1)
o.once(2)
Asserts the step step
executed exactly n times
import { AssertOrder } from 'assert-order'
const o = new AssertOrder()
for (let i = 0; i < 4; i++)
o.exactly(1, 3) // throws at i === 3
Asserts any of the steps steps
executed.
import { AssertOrder } from 'assert-order'
const o = new AssertOrder()
for (let i = 1; i <= 4; i++) {
if (i % 2)
o.any([1, 3])
else
o.any([2, 4])
}
There are more methods available. Use TypeScript to discover them!
# right after fork
npm install
# begin making changes
git checkout -b <branch>
npm run watch
# edit `webpack.config.dev.js` to exclude dependencies for the global build.
# after making change(s)
git commit -m "<commit message>"
git push
# create PR
There are a few useful commands you can use during development.
# Run tests (and lint) automatically whenever you save a file.
npm run watch
# Run tests with coverage stats (but won't fail you if coverage does not meet criteria)
npm run test
# Manually verify the project.
# This will be ran during 'npm preversion' so you normally don't need to run this yourself.
npm run verify
# Build the project.
# You normally don't need to do this.
npm run build
# Run tslint
# You normally don't need to do this as `npm run watch` and `npm version` will automatically run lint for you.
npm run lint
Generated by generator-unional@0.0.1
FAQs
[![NPM version][npm-image]][npm-url] [![NPM downloads][downloads-image]][downloads-url] [![Build status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Greenkeeper badge](https://badges.greenkeeper.io/unional/assert-ord
The npm package assert-order receives a total of 287 weekly downloads. As such, assert-order popularity was classified as not popular.
We found that assert-order demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.