Turned tests to async

parent 203fc2eb
Pipeline #41 failed with stages
......@@ -7,14 +7,14 @@ import {checkFile, checkString} from "../index";
/**
* Test with correct input
*/
test('checkStringCorrect', () => {
test('checkStringCorrect', async () => {
expect(checkString("camelCase")).toBe(true);
});
/**
* Test with wrong input because of first char uppercase
*/
test('checkStringWrong', () => {
test('checkStringWrong', async () => {
expect(checkString("CamelCase")).toBe(false);
expect(checkString("Camel Case")).toBe(false);
});
......@@ -26,7 +26,7 @@ test('checkStringWrong', () => {
/**
* Test with correct jpg file format input
*/
test('checkFileCorrectJPG', () => {
test('checkFileCorrectJPG', async () => {
expect(checkFile("camelCase.jpg")).toBe(true);
expect(checkFile("camelCase.JPG")).toBe(true);
});
......@@ -34,7 +34,7 @@ test('checkFileCorrectJPG', () => {
/**
* Test with wrong jpg file format input
*/
test('checkFileWrongJPG', () => {
test('checkFileWrongJPG', async () => {
expect(checkFile("CamelCase.jpg")).toBe(false);
expect(checkFile("CamelCase.JPG")).toBe(false);
expect(checkFile("Camel Case.jpg")).toBe(false);
......@@ -44,7 +44,7 @@ test('checkFileWrongJPG', () => {
/**
* Test with missing file extension
*/
test('checkFileMissingFileExtension', () => {
test('checkFileMissingFileExtension', async () => {
expect(checkFile("camelCase")).toBe(false);
expect(checkFile("CamelCase")).toBe(false);
expect(checkFile("camel Case")).toBe(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment