-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Updating docs to include better examples (#458)
- Loading branch information
Showing
19 changed files
with
105 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { printTable } from '../../index'; | ||
|
||
describe('Example: 1', () => { | ||
it('Basic', () => { | ||
// Create a table | ||
const testCases = [ | ||
{ Rank: 3, text: 'I would like some Yellow', value: 100 }, | ||
{ Rank: 4, text: 'I hope batch update is working', value: 300 }, | ||
]; | ||
|
||
const returned = printTable(testCases); | ||
expect(returned).toBeUndefined(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Table } from '../../index'; | ||
|
||
describe('Example: 2', () => { | ||
it('Instance', () => { | ||
// Create a table | ||
const p = new Table(); | ||
|
||
// add rows with color | ||
p.addRow({ Record: 'a', text: 'red wine please', value: 10.212 }); | ||
p.addRow({ Record: 'b', text: 'green gemuse please', value: 20.0 }); | ||
p.addRows([ | ||
// adding multiple rows are possible | ||
{ Record: 'c', text: 'gelb bananen bitte', value: 100 }, | ||
{ Record: 'd', text: 'update is working', value: 300 }, | ||
]); | ||
|
||
const returned = p.printTable(); | ||
|
||
expect(returned).toBeUndefined(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.