Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ module.exports = function(grunt) {
shell: {
ts: {
command: 'tsc -p .'
},
eslint: {
command: 'eslint .'
}
},
browserify: {
Expand All @@ -24,40 +21,6 @@ module.exports = function(grunt) {
dest: './build/roslib.js'
}
},
karma: {
options: {
singleRun: true,
browsers: process.env.CI ? ['ChromeHeadlessNoSandbox'] : ['Chrome'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
}
},
test: {
configFile: './test/karma.conf.js'
},
examples: {
configFile: './test/examples/karma.conf.js'
}
},
mochaTest: {
options: {
reporter: 'spec',
timeout: 5000,
require: 'ts-node/register'
},
test: {
src: ['./test/*.test.js']
},
examples: {
src: ['./test/examples/*.js']
},
tcp: {
src: ['./test/tcp/*.js']
}
},
uglify: {
options: {
report: 'min'
Expand Down Expand Up @@ -101,9 +64,6 @@ module.exports = function(grunt) {
});

grunt.registerTask('dev', ['browserify', 'watch']);
grunt.registerTask('test', ['shell:eslint', 'mochaTest:test', 'karma:test']);
grunt.registerTask('test-examples', ['mochaTest:examples', 'karma:examples']);
grunt.registerTask('test-tcp', ['mochaTest:tcp']);
grunt.registerTask('build', ['shell:ts', 'browserify', 'uglify']);
grunt.registerTask('build_and_watch', ['watch']);
grunt.registerTask('doc', ['clean', 'jsdoc']);
Expand Down
1 change: 1 addition & 0 deletions examples/react-example/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logo from './logo.svg'
import './App.css'
import SendMessage from "./component_examples/example_functions"
import React from "react";

function App() {
return (
Expand Down
4 changes: 2 additions & 2 deletions examples/react-example/src/App.test.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { render, screen } from '@testing-library/react'
import App from './App'
import React from "react";

test('renders learn react link', () => {
render(<App />)
const linkElement = screen.getByText(/Send a message to turtle/i)
expect(linkElement).toBeInTheDocument()
expect(screen.getByText(/Send a message to turtle/i)).toBeTruthy();
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react'
import ROSLIB from 'roslib'
import ROSLIB from '../../../..'

function SendMessage() {
const [status, setStatus] = useState("Not connected")
Expand Down
Loading