Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 72d8e73

Browse files
committed
Add test/typescript/cloudant.ts
Ensure Cloudant type declaration files can be imported without error.
1 parent fde43eb commit 72d8e73

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ jsdoc/
66
node_modules/
77
templates/
88
test/legacy/
9+
test/typescript/
910
tmp/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"uuid": "^3.0.1"
5454
},
5555
"scripts": {
56-
"test": "eslint --ignore-path .eslintignore . && mocha && npm run tslint && npm audit",
56+
"test": "eslint --ignore-path .eslintignore . && tsc test/typescript/*.ts && mocha && npm run tslint && npm audit",
5757
"test-verbose": "env DEBUG='*,-mocha:*' npm run test",
5858
"test-live": "NOCK_OFF=true mocha",
5959
"test-live-verbose": "env DEBUG='*,-mocha:*' npm run test-live",

test/mocha.opts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
--exclude test/typescript/*.js
12
--recursive
23
--timeout 10000

test/typescript/cloudant.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright © 2018 IBM Corp. All rights reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Ensure Cloudant type declaration files can be imported without error.
16+
17+
export import cloudant = require('../../types/index');

0 commit comments

Comments
 (0)