github-pages-deploy-action/__tests__/util.test.ts

21 lines
590 B
TypeScript
Raw Normal View History

2020-01-12 09:26:08 +08:00
import {isNullOrUndefined} from '../src/util';
describe('util', () => {
2020-01-12 09:26:08 +08:00
describe('isNullOrUndefined', () => {
it('should return true if the value is null', async() => {
const value = null;
expect(isNullOrUndefined(value)).toBeTruthy()
2020-01-12 09:26:09 +08:00
});
2020-01-12 09:26:08 +08:00
it('should return true if the value is undefined', async() => {
const value = undefined;
expect(isNullOrUndefined(value)).toBeTruthy()
});
it('should return false if the value is defined', async() => {
const value = 'montezuma';
expect(isNullOrUndefined(value)).toBeFalsy()
});
})
})