Skip to content

Instantly share code, notes, and snippets.

@stewones
Created July 4, 2018 21:26
Show Gist options
  • Save stewones/e2a4c44de104a8ae5526e5b45b9da582 to your computer and use it in GitHub Desktop.
Save stewones/e2a4c44de104a8ae5526e5b45b9da582 to your computer and use it in GitHub Desktop.
function spec
import { getVersion } from "../../../src/libs/version";
describe('getVersion', () => {
let short, full;
beforeEach(() => {
short = getVersion(1054);
full = getVersion(1054, true);
})
it('should format the short version', (() => {
expect(short).toBe('1.0.5');
}));
it('should format the full version', (() => {
expect(full).toBe('1.0.5.4');
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment