is-monthly-collaborator-plan.test.ts 878 B

1234567891011121314151617
  1. import { expect } from 'chai'
  2. import isMonthlyCollaboratorPlan from '../../../../../frontend/js/features/subscription/util/is-monthly-collaborator-plan'
  3. describe('isMonthlyCollaboratorPlan', function () {
  4. it('returns false when a plan code without "collaborator" ', function () {
  5. expect(isMonthlyCollaboratorPlan('test', false)).to.be.false
  6. })
  7. it('returns false when on a plan with "collaborator" and "ann"', function () {
  8. expect(isMonthlyCollaboratorPlan('collaborator-annual', false)).to.be.false
  9. })
  10. it('returns false when on a plan with "collaborator" and without "ann" but is a group plan', function () {
  11. expect(isMonthlyCollaboratorPlan('collaborator', true)).to.be.false
  12. })
  13. it('returns true when on a plan with non-group "collaborator" monthly plan', function () {
  14. expect(isMonthlyCollaboratorPlan('collaborator', false)).to.be.true
  15. })
  16. })