Exemple #1
0
	it('should throw an error if `y` is not a number', () =>
	{
		expect(() => create(0, NaN, 10, 10)).toThrow();
	});
Exemple #2
0
		it('should have the expected values', () =>
		{
			expect(RECTANGLE).toEqual(EXPECTED);
		});
Exemple #3
0
			it('should throw an error if `' + property + '` is set', () =>
			{
				expect(() => RECTANGLE[property] = null).toThrow();
			});
Exemple #4
0
	it('should return the empty set if `height` is zero', () =>
	{
		expect(create(0, 0, 10, 0).empty).toBe(true);
	});
Exemple #5
0
	it('should return the empty set if both `width` and `height` are zero', () =>
	{
		expect(create(0, 0, 0, 0).empty).toBe(true);
	});
Exemple #6
0
	it('should throw an error if `height` is `null`', () =>
	{
		expect(() => create(0, 0, 10, null)).toThrow();
	});
Exemple #7
0
	it('should throw an error if `width` is negative', () =>
	{
		expect(() => create(0, 0, -10, 10)).toThrow();
	});
Exemple #8
0
	it('should throw an error if `x` is `null`', () =>
	{
		expect(() => create(null, 0, 10, 10)).toThrow();
	});
Exemple #9
0
	it('should throw an error if `width` is `null`', () =>
	{
		expect(() => create(0, 0, null, 10)).toThrow();
	});
Exemple #10
0
	it('should return `false` for a nonmember within the right vertical bounds', () =>
	{
		expect(contains(RECTANGLE, createPoint(-5, 5))).toBe(false);
	});