Skip to content

Commit

Permalink
refactor: rename tests to better describe what they check for
Browse files Browse the repository at this point in the history
I had trouble understanding what the different tests were meant to
check for, so I've renamed them into something (hopefully) more explanatory.
  • Loading branch information
thomasheartman committed Oct 26, 2022
1 parent be0c8f8 commit 526d940
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ test('Should pass under custom header clientKey', async () => {
jest.advanceTimersByTime(999);
});

test('Should call isEnabled event when impressionData is true', (done) => {
test('Should emit impression events on isEnabled checks when impressionData is true', (done) => {
const bootstrap = [
{
name: 'impression',
Expand Down Expand Up @@ -1084,7 +1084,7 @@ test('Should pass custom headers', async () => {
});
});

test('Should call getVariant event when impressionData is true', (done) => {
test('Should emit impression events on getVariant calls when impressionData is true', (done) => {
const bootstrap = [
{
name: 'impression-variant',
Expand Down Expand Up @@ -1120,7 +1120,7 @@ test('Should call getVariant event when impressionData is true', (done) => {
});
});

test('Should not call isEnabled event when impressionData is false', (done) => {
test('Should not emit impression events on isEnabled calls when impressionData is false', (done) => {
const bootstrap = [
{
name: 'impression',
Expand Down Expand Up @@ -1155,7 +1155,7 @@ test('Should not call isEnabled event when impressionData is false', (done) => {
});
});

test('Should call isEnabled event when impressionData is false and impressionDataAll is true', (done) => {
test('Should emit impression events on isEnabled calls when impressionData is false and impressionDataAll is true', (done) => {
const bootstrap = [
{
name: 'impression',
Expand Down Expand Up @@ -1197,7 +1197,7 @@ test('Should call isEnabled event when impressionData is false and impressionDat
});
});

test('Should call isEnabled event when toggle is unknown and impressionDataAll is true', (done) => {
test('Should emit impression events on isEnabled calls when toggle is unknown and impressionDataAll is true', (done) => {
const bootstrap = [
{
name: 'impression',
Expand Down Expand Up @@ -1235,7 +1235,7 @@ test('Should call isEnabled event when toggle is unknown and impressionDataAll i
});
});

test('Should call getVariant event when impressionData is false and impressionDataAll is true', (done) => {
test('Should emit impression events on getVariant calls when impressionData is false and impressionDataAll is true', (done) => {
const bootstrap = [
{
name: 'impression-variant',
Expand Down

0 comments on commit 526d940

Please sign in to comment.