Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
const expect = require('expect');
|
||||
const decapitalize = require('./decapitalize.js');
|
||||
|
||||
test('Testing decapitalize', () => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
expect(typeof decapitalize === 'function').toBeTruthy();
|
||||
expect(decapitalize('FooBar')).toBe('fooBar');
|
||||
expect(decapitalize('FooBar', true)).toBe('fOOBAR');
|
||||
|
||||
test('decapitalize is a Function', () => {
|
||||
expect(decapitalize).toBeInstanceOf(Function);
|
||||
});
|
||||
t.equal(decapitalize('FooBar'), 'fooBar', 'Works with default parameter');
|
||||
t.equal(decapitalize('FooBar', true), 'fOOBAR', 'Works with second parameter set to true');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user