mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Added types for Chai UUID * Fixed the test file * Removed the message parameter because it's not implemented in the plugin * Removed an empty namespace as it was unnecessary
16 lines
458 B
TypeScript
16 lines
458 B
TypeScript
import { assert, expect, use, should } from 'chai';
|
|
import chaiUuid = require('chai-uuid');
|
|
|
|
use(chaiUuid);
|
|
should();
|
|
|
|
// bdd style
|
|
expect('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7').to.be.uuid('v4');
|
|
expect('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7').to.be.guid;
|
|
expect('invalid').to.not.be.uuid('v4');
|
|
expect('invalid').to.not.be.guid();
|
|
|
|
// tdd style
|
|
assert.uuid('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7', 'v4');
|
|
assert.guid('67cb8aa1-61bb-4b9b-8ca9-9dc0b278d5f7');
|