Tried to write a test case which checks the tasks array length not to be negative and it has to test by using ‘not.toBe’ by below code getting error

index.js

var tasks=[];

tasks=[‘task one’, ‘task two’];

module.exports=tasks;

index.test.js

const tasks=require(‘./index.js’)

x=tasks.length;

test(‘cannot be negative’,(x)=>{

expect(x).not.toBe(x<0)

})