Skip to content

Commit

Permalink
remove pointless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenberger committed May 29, 2017
1 parent a0799ea commit 29c2b76
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions test/Async-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,85 +262,6 @@ describe('Async', () => {
});
});

describe('with ignoreAccents', () => {
it('calls loadOptions with unchanged text', () => {
createControl({
ignoreAccents: true,
ignoreCase: false
});
typeSearchText('TeSt');
expect(loadOptions, 'was called with', 'TeSt');
});

it('strips accents before calling loadOptions when enabled', () => {
createControl({
ignoreAccents: true,
ignoreCase: false
});
typeSearchText('Gedünstmaßig');
// This should really be Gedunstmassig: ß -> ss
expect(loadOptions, 'was called with', 'Gedunstmasig');
});

it('does not strip accents before calling loadOptions when diabled', () => {
createControl({
ignoreAccents: false,
ignoreCase: false
});
typeSearchText('Gedünstmaßig');
expect(loadOptions, 'was called with', 'Gedünstmaßig');
});
});

describe('with ignore case', () => {
it('converts everything to lowercase when enabled', () => {
createControl({
ignoreAccents: false,
ignoreCase: true
});
typeSearchText('TeSt');
expect(loadOptions, 'was called with', 'test');
});

it('converts accents to lowercase when enabled', () => {
createControl({
ignoreAccents: false,
ignoreCase: true
});
typeSearchText('WÄRE');
expect(loadOptions, 'was called with', 'wäre');
});

it('does not convert text to lowercase when disabled', () => {
createControl({
ignoreAccents: false,
ignoreCase: false
});
typeSearchText('WÄRE');
expect(loadOptions, 'was called with', 'WÄRE');
});
});

describe('with ignore case and ignore accents', () => {
it('converts everything to lowercase', () => {
createControl({
ignoreAccents: true,
ignoreCase: true
});
typeSearchText('TeSt');
expect(loadOptions, 'was called with', 'test');
});

it('removes accents and converts to lowercase', () => {
createControl({
ignoreAccents: true,
ignoreCase: true
});
typeSearchText('WÄRE');
expect(loadOptions, 'was called with', 'ware');
});
});

describe('noResultsText', () => {

beforeEach(() => {
Expand Down

0 comments on commit 29c2b76

Please sign in to comment.