Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -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;
19 changes: 10 additions & 9 deletions src/index.test.js
Original file line number Diff line number Diff line change
@@ -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)
})
});