Skip to content

Commit 6b5bd86

Browse files
Merge pull request #298 from splitio/tests_refactor
Tests refactor: removed unnecessary comments
2 parents 4a9984a + 4a4191e commit 6b5bd86

File tree

16 files changed

+14
-33
lines changed

16 files changed

+14
-33
lines changed

src/evaluator/matchers/__tests__/all.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER ALL_KEYS / should always return true', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
type: matcherTypes.ALL_KEYS,
109
value: undefined
1110
} as IMatcherDto) as IMatcher;

src/evaluator/matchers/__tests__/between.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER BETWEEN / should return true ONLY when the value is between 10 and 20', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.BETWEEN,
1110
value: {

src/evaluator/matchers/__tests__/boolean.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER BOOLEAN / should return true ONLY when the value is true', function () {
7-
// @ts-ignore
87
const matcher = matcherFactory(loggerMock, {
98
type: matcherTypes.EQUAL_TO_BOOLEAN,
109
value: true

src/evaluator/matchers/__tests__/cont_all.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER CONTAINS_ALL_OF_SET / should return true ONLY when value contains all of set ["update", "add"]', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.CONTAINS_ALL_OF_SET,
1110
value: ['update', 'add']

src/evaluator/matchers/__tests__/cont_any.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER CONTAINS_ANY_OF_SET / should return true ONLY when value contains any of set ["update", "add"]', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.CONTAINS_ANY_OF_SET,
1110
value: ['update', 'add']

src/evaluator/matchers/__tests__/cont_str.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER CONTAINS_STRING / should return true ONLY when the value is contained in ["roni", "bad", "ar"]', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.CONTAINS_STRING,
1110
value: ['roni', 'bad', 'ar']

src/evaluator/matchers/__tests__/dependency.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ test('MATCHER IN_SPLIT_TREATMENT / Edge cases', function () {
107107
type: matcherTypes.IN_SPLIT_TREATMENT,
108108
value: {
109109
split: 'always-off',
110-
// @ts-ignore
111110
treatments: [null, [1, 2], 3, {}, true, 'on']
112111
}
113112
} as IMatcherDto, mockStorage as IStorageSync) as IMatcher;

src/evaluator/matchers/__tests__/eq.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER EQUAL / should return true ONLY when the value is equal to 10', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.EQUAL_TO,
1110
value: 10

src/evaluator/matchers/__tests__/eq_set.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER EQUAL_TO_SET / should return true ONLY when value is equal to set ["update", "add"]', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.EQUAL_TO_SET,
1110
value: ['update', 'add']

src/evaluator/matchers/__tests__/ew.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { IMatcher, IMatcherDto } from '../../types';
44
import { loggerMock } from '../../../logger/__tests__/sdkLogger.mock';
55

66
test('MATCHER ENDS_WITH / should return true ONLY when the value ends with ["a", "b", "c"]', function () {
7-
// @ts-ignore
8-
let matcher = matcherFactory(loggerMock, {
7+
const matcher = matcherFactory(loggerMock, {
98
negate: false,
109
type: matcherTypes.ENDS_WITH,
1110
value: ['a', 'b', 'c']
@@ -19,8 +18,7 @@ test('MATCHER ENDS_WITH / should return true ONLY when the value ends with ["a",
1918
});
2019

2120
test('MATCHER ENDS_WITH / should return true ONLY when the value ends with ["demo.test.org"]', function () {
22-
// @ts-ignore
23-
let matcher = matcherFactory(loggerMock, {
21+
const matcher = matcherFactory(loggerMock, {
2422
negate: false,
2523
type: matcherTypes.ENDS_WITH,
2624
value: ['demo.test.org']

0 commit comments

Comments
 (0)