mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
20 lines
797 B
Plaintext
20 lines
797 B
Plaintext
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import assert from 'assert';
|
|
|
|
import SuggestionBox from 'components/suggestion/suggestion_box.jsx';
|
|
|
|
describe('SuggestionBox', function() {
|
|
it('findOverlap', function(done) {
|
|
assert.equal(SuggestionBox.findOverlap('', 'blue'), '');
|
|
assert.equal(SuggestionBox.findOverlap('red', ''), '');
|
|
assert.equal(SuggestionBox.findOverlap('red', 'blue'), '');
|
|
assert.equal(SuggestionBox.findOverlap('red', 'dog'), 'd');
|
|
assert.equal(SuggestionBox.findOverlap('red', 'education'), 'ed');
|
|
assert.equal(SuggestionBox.findOverlap('red', 'reduce'), 'red');
|
|
assert.equal(SuggestionBox.findOverlap('black', 'ack'), 'ack');
|
|
|
|
done();
|
|
});
|
|
}); |