Skip to content

Commit 820d600

Browse files
committed
Update tests for refactored modules
1 parent fb721c2 commit 820d600

15 files changed

+258
-271
lines changed

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@
6363
"nyc": {
6464
"temp-directory": "./coverage/.nyc_output",
6565
"include": [
66-
"lib",
67-
"scripts"
66+
"src"
6867
],
6968
"exclude": [
7069
"tests"
@@ -79,7 +78,6 @@
7978
},
8079
"files": [
8180
"/index.js",
82-
"/lib",
83-
"/scripts"
81+
"/src"
8482
]
8583
}

tests/dummy-adapters.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ MockSlackClient.prototype.send = function(envelope, message) {
2222
this.logger.info('Sending ' + JSON.stringify(message) + ' to ' + JSON.stringify(envelope));
2323
};
2424

25-
function MockSlackAdapter(logger) {
25+
function SlackBot(logger) {
2626
this.logger = logger;
2727
this.client = new MockSlackClient(logger);
2828
}
@@ -35,5 +35,5 @@ MockBotFrameworkAdapter.prototype.send = function(envelope, message) {
3535
this.logger.info('Sending ' + JSON.stringify(message) + ' to ' + JSON.stringify(envelope));
3636
};
3737

38-
module.exports.MockSlackAdapter = MockSlackAdapter;
38+
module.exports.MockSlackAdapter = SlackBot;
3939
module.exports.MockBotFrameworkAdapter = MockBotFrameworkAdapter;

tests/dummy-logger.js

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
/*
2-
Licensed to the StackStorm, Inc ('StackStorm') under one or more
3-
contributor license agreements. See the NOTICE file distributed with
4-
this work for additional information regarding copyright ownership.
5-
The ASF licenses this file to You under the Apache License, Version 2.0
6-
(the "License"); you may not use this file except in compliance with
7-
the License. You may obtain a copy of the License at
8-
9-
http://www.apache.org/licenses/LICENSE-2.0
10-
11-
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an "AS IS" BASIS,
13-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
See the License for the specific language governing permissions and
15-
limitations under the License.
16-
*/
1+
// Copyright 2019 Extreme Networks, Inc.
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.
1714

1815
"use strict";
1916

tests/test-command-factory.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ var fs = require('fs'),
2020
chai = require('chai'),
2121
assert = chai.assert,
2222
expect = chai.expect,
23-
CommandFactory = require('../lib/command_factory.js'),
23+
CommandFactory = require('../src/lib/command_factory.js'),
2424
Robot = require('./dummy-robot.js'),
25-
formatCommand = require('../lib/format_command.js'),
26-
utils = require('../lib/utils.js');
25+
formatCommand = require('../src/lib/format_command.js'),
26+
utils = require('../src/lib/utils.js');
2727

2828
var ALIAS_FIXTURES = fs.readFileSync('tests/fixtures/aliases.json');
2929
ALIAS_FIXTURES = JSON.parse(ALIAS_FIXTURES);

tests/test-formatcommand.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
var chai = require('chai'),
2020
assert = chai.assert,
2121
expect = chai.expect,
22-
formatcommand = require('../lib/format_command.js');
22+
formatcommand = require('../src/lib/format_command.js');
2323

2424
describe('format_command', function() {
2525
it('should create the right format with format and description',

0 commit comments

Comments
 (0)