Skip to content

Commit

Permalink
refactor(core): add getSelf
Browse files Browse the repository at this point in the history
  • Loading branch information
notaphplover committed Nov 30, 2024
1 parent fbd9d41 commit e846667
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { beforeAll, describe, expect, it } from '@jest/globals';

import { getSelf } from './getSelf';

describe(getSelf.name, () => {
let value: unknown;

beforeAll(() => {
value = Symbol();
});

describe('when called', () => {
let result: unknown;

beforeAll(() => {
result = getSelf(value);
});

it('should return expected value', () => {
expect(result).toBe(value);
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function getSelf<T>(self: T): T {
return self;
}

0 comments on commit e846667

Please sign in to comment.