Open ceckoslab opened 10 months ago
Today our testing is basically comparing 2 JSON files.
Example:
const expected = JSON.parse(fs.readFileSync(`./testdata/dashboards/${dashboard}.json`, { encoding: 'utf8', flag: 'r' })); const actual = JSON.parse(fs.readFileSync(`./build/dashboards/${dashboard}.json`, { encoding: 'utf8', flag: 'r' })); expect(actual).toMatchObject(expected);
Where this is convenient for an MVP it will be great if we actually start testing with code if a given panel has the expected configuration.
Let's write some testing code only for the General dashboard in this ticket.
I am not sure what you want to test here.
Today our testing is basically comparing 2 JSON files.
Example:
Where this is convenient for an MVP it will be great if we actually start testing with code if a given panel has the expected configuration.
Let's write some testing code only for the General dashboard in this ticket.