diff --git a/chai-datetime/chai-datetime-tests.ts b/chai-datetime/chai-datetime-tests.ts
new file mode 100644
index 0000000000..0b7ff729ff
--- /dev/null
+++ b/chai-datetime/chai-datetime-tests.ts
@@ -0,0 +1,47 @@
+///
+///
+///
+
+var expect = chai.expect;
+
+function test_equalTime(){
+ var date: Date = new Date(2014, 1, 1);
+ expect(date).to.be.equalTime(date);
+ date.should.be.equalTime(date);
+ assert.equalTime(date, date);
+}
+
+function test_beforeTime(){
+ var date: Date = new Date(2014, 1, 1);
+ expect(date).to.be.beforeTime(date);
+ date.should.be.beforeTime(date);
+ assert.beforeTime(date, date);
+}
+
+function test_afterTime(){
+ var date: Date = new Date(2014, 1, 1);
+ expect(date).to.be.afterTime(date);
+ date.should.be.afterTime(date);
+ assert.afterTime(date, date);
+}
+
+function test_equalDate(){
+ var date: Date = new Date(2014, 1, 1);
+ expect(date).to.equalDate(date);
+ date.should.equalDate(date);
+ assert.equalDate(date, date);
+}
+
+function test_beforeDate(){
+ var date: Date = new Date(2014, 1, 1);
+ expect(date).to.beforeDate(date);
+ date.should.beforeDate(date);
+ assert.beforeDate(date, date);
+}
+
+function test_afterDate(){
+ var date: Date = new Date(2014, 1, 1);
+ expect(date).to.afterDate(date);
+ date.should.afterDate(date);
+ assert.afterDate(date, date);
+}
\ No newline at end of file
diff --git a/chai-datetime/chai-datetime.d.ts b/chai-datetime/chai-datetime.d.ts
new file mode 100644
index 0000000000..432f6bb247
--- /dev/null
+++ b/chai-datetime/chai-datetime.d.ts
@@ -0,0 +1,33 @@
+// Type definitions for chai-datetime
+// Project: https://github.com/gaslight/chai-datetime.git
+// Definitions by: Cliff Burger
+// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module chai {
+
+ interface Expect {
+ afterDate(date: Date): boolean;
+ beforeDate(date: Date): boolean;
+ equalDate(date: Date): boolean;
+
+ afterTime(date: Date): boolean;
+ beforeTime(date: Date): boolean;
+ equalTime(date: Date): boolean;
+ }
+
+ interface Assert {
+ afterDate(leftDate: Date, rightDate: Date): boolean;
+ beforeDate(leftDate: Date, rightDate: Date): boolean;
+ equalDate(leftDate: Date, rightDate: Date): boolean;
+
+ afterTime(leftDate: Date, rightDate: Date): boolean;
+ beforeTime(leftDate: Date, rightDate: Date): boolean;
+ equalTime(leftDate: Date, rightDate: Date): boolean;
+ }
+}
+
+interface Date {
+ should: chai.Expect;
+}
diff --git a/chai/chai.d.ts b/chai/chai.d.ts
index 7318744012..d840aba964 100644
--- a/chai/chai.d.ts
+++ b/chai/chai.d.ts
@@ -9,28 +9,28 @@ declare module chai {
function expect(target: any, message?: string): Expect;
// Provides a way to extend the internals of Chai
- function use(fn: (chai: any, utils: any) => void);
+ function use(fn: (chai: any, utils: any) => void): any;
interface ExpectStatic {
(target: any): Expect;
}
interface Assertions {
- attr(name, value?);
- css(name, value?);
- data(name, value?);
- class(className);
- id(id);
- html(html);
- text(text);
- value(value);
- visible;
- hidden;
- selected;
- checked;
- disabled;
- empty;
- exist;
+ attr(name: string, value?: string): any;
+ css(name: string, value?: string): any;
+ data(name: string, value?: string): any;
+ class(className: string): any;
+ id(id: string): any;
+ html(html: string): any;
+ text(text: string): any;
+ value(value: string): any;
+ visible: any;
+ hidden: any;
+ selected: any;
+ checked: any;
+ disabled: any;
+ empty: any;
+ exist: any;
}
interface Expect extends LanguageChains, NumericComparison, TypeComparison, Assertions {