Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed Dec 16, 2024
1 parent aca3bf2 commit f2f26e9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/scheduler/src/__tests__/Scheduler-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

'use strict';

import {enableRequestPaint} from '../SchedulerFeatureFlags';

Check failure on line 13 in packages/scheduler/src/__tests__/Scheduler-test.js

View workflow job for this annotation

GitHub Actions / Run eslint

'enableRequestPaint' is defined but never used
import {frameYieldMs} from '../forks/SchedulerFeatureFlags.www';

Check failure on line 14 in packages/scheduler/src/__tests__/Scheduler-test.js

View workflow job for this annotation

GitHub Actions / Run eslint

'frameYieldMs' is defined but never used

let Scheduler;
let runtime;
let performance;
Expand All @@ -18,6 +21,7 @@ let scheduleCallback;
let requestPaint;
let shouldYield;
let NormalPriority;
let SchedulerFeatureFlags;

// The Scheduler implementation uses browser APIs like `MessageChannel` and
// `setTimeout` to schedule work on the main thread. Most of our tests treat
Expand All @@ -42,6 +46,7 @@ describe('SchedulerBrowser', () => {
NormalPriority = Scheduler.unstable_NormalPriority;
requestPaint = Scheduler.unstable_requestPaint;
shouldYield = Scheduler.unstable_shouldYield;
SchedulerFeatureFlags = require('../SchedulerFeatureFlags');
});

afterEach(() => {
Expand Down Expand Up @@ -199,7 +204,9 @@ describe('SchedulerBrowser', () => {
runtime.assertLog([
'Message Event',
'Task',
'Yield at 0ms',
SchedulerFeatureFlags.enableRequestPaint
? 'Yield at 0ms'
: `Yield at ${SchedulerFeatureFlags.frameYieldMs}ms`,
'Post Message',
]);

Expand Down

0 comments on commit f2f26e9

Please sign in to comment.