github: add CI for pull requests

and hacks to get tests working
This commit is contained in:
David Lechner
2020-05-20 14:52:45 -05:00
committed by David Lechner
parent cde8d6b764
commit 90817a1ae7
6 changed files with 63 additions and 10 deletions
-9
View File
@@ -1,9 +0,0 @@
import { render } from '@testing-library/react';
import React from 'react';
import App from './App';
test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
+9
View File
@@ -0,0 +1,9 @@
import { fmod } from './math';
test('fmod of positive numbers', () => {
expect(fmod(3, 4)).toBe(3 % 4);
});
test('fmod of negative and positive number', () => {
expect(fmod(-3, 4)).toBe(1);
});