difference-of-squares.test.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { Squares } from './difference-of-squares';
  2. // eslint-disable-next-line no-global-assign
  3. xit = it
  4. describe('Squares', () => {
  5. describe('up to 5', () => {
  6. const squares = new Squares(5)
  7. it('gets the square of sum', () => {
  8. expect(squares.squareOfSum).toBe(225)
  9. })
  10. xit('gets the sum of squares', () => {
  11. expect(squares.sumOfSquares).toBe(55)
  12. })
  13. xit('gets the difference', () => {
  14. expect(squares.difference).toBe(170)
  15. })
  16. })
  17. describe('up to 10', () => {
  18. const squares = new Squares(10)
  19. xit('gets the square of sum', () => {
  20. expect(squares.squareOfSum).toBe(3025)
  21. })
  22. xit('gets the sum of squares', () => {
  23. expect(squares.sumOfSquares).toBe(385)
  24. })
  25. xit('gets the difference', () => {
  26. expect(squares.difference).toBe(2640)
  27. })
  28. })
  29. describe('up to 100', () => {
  30. const squares = new Squares(100)
  31. xit('gets the square of sum', () => {
  32. expect(squares.squareOfSum).toBe(25502500)
  33. })
  34. xit('gets the sum of squares', () => {
  35. expect(squares.sumOfSquares).toBe(338350)
  36. })
  37. xit('gets the difference', () => {
  38. expect(squares.difference).toBe(25164150)
  39. })
  40. })
  41. })