Skip to content

Instantly share code, notes, and snippets.

@mehdihettak
Created March 18, 2019 16:36
Show Gist options
  • Select an option

  • Save mehdihettak/79a325f6b3fffcdf137c4a70c7c61261 to your computer and use it in GitHub Desktop.

Select an option

Save mehdihettak/79a325f6b3fffcdf137c4a70c7c61261 to your computer and use it in GitHub Desktop.
const assert = require('assert');
// ... Ton code ici ...
class BankCustomer {
constructor(name, code) {
let codeSecret = code;
let nameSecret = name;
this.getName = () => nom;
this.verifyInput = () => {
if (code === codeSecret) {
return true;
}
else {
return false;
}
}
}
}
// Tests
const customer = new BankCustomer('John Doe', '3579');
assert.equal(typeof customer.getName, 'function');
assert.equal(typeof customer.verifyPinInput, 'function');
assert.equal(customer.getName(), 'John Doe');
assert.ok(customer.verifyPinInput('3579'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment