From bae7b9f6a0a52db5edebfeb00683268ef498730f Mon Sep 17 00:00:00 2001 From: fmuiin14 Date: Sat, 31 Oct 2020 16:33:27 +0700 Subject: [PATCH] update fitur contributor fmuiin14 --- src/index.js | 27 ++++++++++++++------------- src/index.test.js | 19 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/index.js b/src/index.js index 4be82ce..4307b4f 100644 --- a/src/index.js +++ b/src/index.js @@ -1,19 +1,20 @@ const contributors = [ - { name: 'Hafid Mukhlasin', link: 'https://github.com/hscstudio' }, - { name: 'Kungfu Koding', link: 'https://github.com/kungfukoding' }, - { name: 'easyphpframework', link: 'https://github.com/easyphpframework' }, - { name: 'Tio Andri Prasetyo', link: 'https://github.com/tioandri91' }, - { name: 'Tesmo', link: 'https://github.com/tesmoinc/belajar-git' }, - { name: 'Sigdewa', link: 'https://github.com/sigdewa/belajar-git' } - + { name: "Hafid Mukhlasin", link: "https://github.com/hscstudio" }, + { name: "Kungfu Koding", link: "https://github.com/kungfukoding" }, + { name: "easyphpframework", link: "https://github.com/easyphpframework" }, + { name: "Tio Andri Prasetyo", link: "https://github.com/tioandri91" }, + { name: "Tesmo", link: "https://github.com/tesmoinc/belajar-git" }, + { name: "Sigdewa", link: "https://github.com/sigdewa/belajar-git" }, + { name: "Fathul Muiin", link: "https://github.com/fmuiin14/belajar-git" }, + // { name: 'namamu', link: 'link_githubmu' }, -] +]; const found = (contributor) => { const result = contributors.find((item) => { - return contributor === item.name - }) - return result ? true : false -} + return contributor === item.name; + }); + return result ? true : false; +}; -module.exports = found +module.exports = found; diff --git a/src/index.test.js b/src/index.test.js index 6a2d427..04514d4 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -1,11 +1,12 @@ -const found = require('./index') +const found = require("./index"); -test('contributor ready', () => { - expect(found('Hafid Mukhlasin')).toBe(true) - expect(found('Kungfu Koding')).toBe(true) - expect(found('easyphpframework')).toBe(true) - expect(found('Tio Andri Prasetyo')).toBe(true) - expect(found('Tesmo')).toBe(true) - expect(found('Sigdewa')).toBe(true) +test("contributor ready", () => { + expect(found("Hafid Mukhlasin")).toBe(true); + expect(found("Kungfu Koding")).toBe(true); + expect(found("easyphpframework")).toBe(true); + expect(found("Tio Andri Prasetyo")).toBe(true); + expect(found("Tesmo")).toBe(true); + expect(found("Sigdewa")).toBe(true); + expect(found("Fathul Muiin")).toBe(true); // expect(found('Namamu')).toBe(true) -}) \ No newline at end of file +});