Fakultas Ilmu Komputer UI

Commit 77891a43 authored by RANI LASMA ULI's avatar RANI LASMA ULI
Browse files

Merge branch '1606885025-213' into 'master'

add test for Github link validation

See merge request !239
parents 4fe080b3 b5dee798
Pipeline #26680 passed with stages
in 19 minutes and 48 seconds
import { isFromGithubLinkValid } from "../Utils";
var assert = require('assert');
describe('isFromGithubLinkValid', function () {
it('should return nothing when param is null', function () {
assert(isFromGithubLinkValid(null) == null);
it('should return false when link doesnt include https://github.com', function () {
assert(isFromGithubLinkValid("https://haha.com") == false);
it('should return true when link include https://github.com', function () {
assert(isFromGithubLinkValid("https://github.com/ranisianipar") == true);
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment