aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWing Leung <[email protected]>2022-05-25 18:07:30 +0100
committerGitHub <[email protected]>2022-05-25 17:07:30 +0000
commitccd2959d72e70b74c7faf755bb690da35e3c48a6 (patch)
tree17d6350aff948d446145b3d0737d2612a03ccbdb /test
parentc95826f348bf317d3cff240a7ebbae4bd80956f6 (diff)
downloadfaker-ccd2959d72e70b74c7faf755bb690da35e3c48a6.tar.xz
faker-ccd2959d72e70b74c7faf755bb690da35e3c48a6.zip
feat: add music.songName (#996)
Co-authored-by: Wing Leung Choi <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/music.spec.ts21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/music.spec.ts b/test/music.spec.ts
index 3fa51b8e..561ddf02 100644
--- a/test/music.spec.ts
+++ b/test/music.spec.ts
@@ -8,6 +8,9 @@ const seededRuns = [
genre: {
noArgs: 'Country',
},
+ songName: {
+ noArgs: 'Only The Lonely (Know The Way I Feel)',
+ },
},
},
{
@@ -16,6 +19,9 @@ const seededRuns = [
genre: {
noArgs: 'Folk',
},
+ songName: {
+ noArgs: 'Turn! Turn! Turn! (To Everything There is a Season)',
+ },
},
},
{
@@ -24,11 +30,14 @@ const seededRuns = [
genre: {
noArgs: 'Non Music',
},
+ songName: {
+ noArgs: 'The End of the World',
+ },
},
},
];
-const functionNames = ['genre'];
+const functionNames = ['genre', 'songName'];
const NON_SEEDED_BASED_RUN = 5;
@@ -64,6 +73,16 @@ describe('music', () => {
expect(faker.definitions.music.genre).toContain(genre);
});
});
+
+ describe('songName()', () => {
+ it('returns a random song name', () => {
+ const songName = faker.music.songName();
+
+ expect(songName).toBeTruthy();
+ expect(songName).toBeTypeOf('string');
+ expect(faker.definitions.music.song_name).toContain(songName);
+ });
+ });
}
});
});