Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 11 additions & 0 deletions examples/truthy-falsy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "ava-truthy-falsy",
"description": "Example for test truthy-falsy",
"type": "module",
"scripts": {
"test": "ava test.js --no-config test.js"
},
"devDependencies": {
"ava": "^6.0.0"
}
}
5 changes: 5 additions & 0 deletions examples/truthy-falsy/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Truthy falsy

> Example for [using truthy falsy on ava](https://github.com/avajs/ava/blob/main/docs/recipes/truth-falsy.md)

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/avajs/ava/tree/main/examples/truthy-falsy?file=source%2Ftest.ts&terminal=test&view=editor)
8 changes: 8 additions & 0 deletions examples/truthy-falsy/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import test from 'ava';

// This example shows how to use the truthy and falsy assertions in AVA.

test('truthy and falsy values', t => {
t.truthy('hello world');
t.falsy('');
});
8 changes: 8 additions & 0 deletions examples/watch-mode/basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import test from 'ava';

// Run this example with: `npx ava --watch examples/watch-mode/basic.js`

test('live reload', t => {
const value = 2 + 2;
t.is(value, 4);
});
Loading