1 |
|
2 |
|
3 | function greeter(person : Person) {
|
4 | return "Hello, " + person.firstname + " " + person.lastname;
|
5 | }
|
6 |
|
7 | describe("A suite", () => {
|
8 | it("contains spec with an expectation", () => {
|
9 | const foo = { bar: 'foo.bar' };
|
10 | const s = `${foo.bar}.blabla`;
|
11 | console.log(s);
|
12 | expect(true).toBe(true);
|
13 | });
|
14 | it("greeter", () => {
|
15 | var user = {firstname: "Jane", lastname: "User"};
|
16 | console.log(greeter(user));
|
17 | });
|
18 | });
|
19 |
|
20 | describe("A suite is just a function", () => {
|
21 | var a: boolean;
|
22 | it("and so is a spec", () => {
|
23 | a = true;
|
24 | expect(a).toBe(true);
|
25 | });
|
26 | });
|