-
Notifications
You must be signed in to change notification settings - Fork 0
Unit Testing: Automatic Thoughts
talgoldv edited this page Jan 19, 2023
·
1 revision
import { AutomaticThoughts } from "../../../src/architecture/business_layer/modules/AutomaticThoughts";
describe("AutomaticThoughts Summary tests", () => {
test('checking getsummary with thought', () =>{
const date = new Date(Date.now());
const thought ="I'm pretty";
const auto = new AutomaticThoughts(date, thought);
expect(auto.getSummary())
.toBe(date.toString()+":\n"+"I'm pretty");
});
test('checking getsummary with set thought', () =>{
const date = new Date(Date.now());
const thought ="I'm pretty";
const auto = new AutomaticThoughts(date, thought);
const setTh ="I'm pretty sad";
auto.setThought(setTh);
expect(auto.getSummary())
.toBe(date.toString()+":\n"+"I'm pretty sad");
});
});