mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
create new definitions for chai-html (#43688)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// tests taken from https://www.npmjs.com/package/chai-html
|
||||
|
||||
import { use, expect } from 'chai';
|
||||
import * as chaiHtml from 'chai-html';
|
||||
|
||||
use(chaiHtml);
|
||||
|
||||
expect('<div><img /></div>').html.to.equal('<div><img></div>');
|
||||
expect('<h1>Hello World!</h1>').html.to.not.equal('<h1>Hallo Welt!</h1>');
|
||||
|
||||
expect('<div><!--Comment--></div>').html.ignoringComments.to.equal('<div></div>');
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for chai-html 1.3
|
||||
// Project: https://github.com/i-like-robots/chai-html
|
||||
// Definitions by: Alex <https://github.com/adjerbetian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
/// <reference types="chai" />
|
||||
|
||||
declare global {
|
||||
namespace Chai {
|
||||
interface Assertion {
|
||||
html: ChaiHtml.HtmlAssertion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace ChaiHtml {
|
||||
interface HtmlAssertion extends Chai.Assertion {
|
||||
ignoringComments: Chai.Assertion;
|
||||
}
|
||||
}
|
||||
|
||||
declare const chaiHtml: Chai.ChaiPlugin;
|
||||
declare namespace chaiHtml {}
|
||||
export = chaiHtml;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"chai-html-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user