mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-01 17:11:21 -04:00
Use ES6 linting rules in the project root
Update all tests for `no-var` and `prefer-arrow-callback` (using `--fix`)
This commit is contained in:
parent
5f59d1e7e5
commit
bafdf8d9f2
36 changed files with 666 additions and 666 deletions
test/unit
|
@ -1,10 +1,10 @@
|
|||
var test = require('tap').test;
|
||||
var Clock = require('../../src/io/clock');
|
||||
var Runtime = require('../../src/engine/runtime');
|
||||
const test = require('tap').test;
|
||||
const Clock = require('../../src/io/clock');
|
||||
const Runtime = require('../../src/engine/runtime');
|
||||
|
||||
test('spec', function (t) {
|
||||
var rt = new Runtime();
|
||||
var c = new Clock(rt);
|
||||
test('spec', t => {
|
||||
const rt = new Runtime();
|
||||
const c = new Clock(rt);
|
||||
|
||||
t.type(Clock, 'function');
|
||||
t.type(c, 'object');
|
||||
|
@ -15,14 +15,14 @@ test('spec', function (t) {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cycle', function (t) {
|
||||
var rt = new Runtime();
|
||||
var c = new Clock(rt);
|
||||
test('cycle', t => {
|
||||
const rt = new Runtime();
|
||||
const c = new Clock(rt);
|
||||
|
||||
t.ok(c.projectTimer() <= 0.1);
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
c.resetProjectTimer();
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
t.ok(c.projectTimer() > 0);
|
||||
c.pause();
|
||||
t.ok(c.projectTimer() > 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue