Skip to content

Commit 42b86c5

Browse files
committed
fix: test imports
1 parent 46b395f commit 42b86c5

File tree

10 files changed

+51
-18
lines changed

10 files changed

+51
-18
lines changed

test/run/run.c.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - c', () => {
66
it('.c file runs correctly', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 19,
99
lang: 'c',
1010
source: (new Buffer(`

test/run/run.cpp.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - cpp', () => {
66
it('.cpp file runs correctly', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 20,
99
lang: 'cpp',
1010
source: (new Buffer(`

test/run/run.csharp.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - csharp', () => {
66
it('.cs file runs correctly', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 21,
99
lang: 'csharp',
1010
source: (new Buffer(`

test/run/run.java8.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - java8', () => {
66
it('.java file runs correctly (Java8)', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 22,
99
lang: 'java8',
1010
source: (new Buffer(`

test/run/run.nodejs10.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - nodejs10', () => {
66
it('.js file runs correctly (NodeJS 6)', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 24,
99
lang: 'nodejs10',
1010
source: (new Buffer(`

test/run/run.nodejs8.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - nodejs8', () => {
66
it('.js file runs correctly (NodeJS 8)', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 25,
99
lang: 'nodejs8',
1010
source: (new Buffer(`

test/run/run.py2.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - py2', () => {
66
it('.py file runs correctly (Python 2.7)', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 23,
99
lang: 'py2',
1010
source: (new Buffer(`

test/run/run.py3.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - py3', () => {
66
it('.py file runs correctly (Python 3.0)', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 26,
99
lang: 'py3',
1010
source: (new Buffer(`

test/run/run.ruby.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {executor} from '../../src/tasks/'
1+
import {runExecutor} from '../../src/tasks/'
22
import {expect} from 'chai'
33

44

55
describe('run - ruby', () => {
66
it('.rb file runs correctly', async () => {
7-
const runResult = await executor({
7+
const runResult = await runExecutor({
88
id: 27,
99
lang: 'ruby',
1010
source: (new Buffer(`

test/submission/submit.cpp.spec.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import {submissionExecutor} from '../../src/tasks/'
2+
import {expect} from 'chai'
3+
4+
describe('submit - cpp', () => {
5+
it('.cpp file submits correctly', async () => {
6+
const source = `
7+
#include <iostream>
8+
using namespace std;
9+
int main () {
10+
char in[10];
11+
cin>>in;
12+
cout<<"Hello "<<in;
13+
return 0;
14+
}`
15+
16+
const submitResult = await submissionExecutor({
17+
id: 1,
18+
lang: 'cpp',
19+
source: (new Buffer(source)).toString('base64'),
20+
testcases: [{
21+
id: 1,
22+
input: 'https://minio.cb.lk/public/input',
23+
output: 'https://minio.cb.lk/public/output'
24+
}]
25+
})
26+
27+
console.log(submitResult)
28+
29+
// assertions
30+
expect(1).to.eq(1)
31+
})
32+
})
33+

0 commit comments

Comments
 (0)