Skip to content

Commit

Permalink
fix(lint): rename interface to pass linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Mar 2, 2020
1 parent ab1b8b1 commit d981f98
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export type ClassValue = string | null | boolean | undefined | ClassListDictionary | ClassListArray;
export type ClassValue = string | null | boolean | undefined | IClassListDictionary | ClassListArray;

export type ClassListArray = ClassValue[];

export interface ClassListDictionary {
[cn: string]: any; // in can be anything
export interface IClassListDictionary {
[cn: string]: any; // it can be anything
}
14 changes: 11 additions & 3 deletions tests/dcnb.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cnb, dcnb } from '../src';
import { dcnb } from '../src';

describe('dcnb', () => {
it('should be defined', () => {
Expand Down Expand Up @@ -32,8 +32,16 @@ describe('dcnb', () => {
it('should build from various amount of objects', () => {
expect(dcnb({ '': true })).toBe('');
expect(dcnb({ a: true })).toBe('a');
// eslint-disable-next-line @typescript-eslint/no-empty-function
expect(dcnb({ a: true, b: true, d: true }, { c: true, d: false }, { d: () => {} })).toBe('a b d c');
expect(
dcnb(
{ a: true, b: true, d: true },
{ c: true, d: false },
{
// eslint-disable-next-line @typescript-eslint/no-empty-function
d: () => {},
},
),
).toBe('a b d c');
});

it('should ignore invalid entries', () => {
Expand Down

0 comments on commit d981f98

Please sign in to comment.