Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
714 B

  1. // make tests run in both Node & Express
  2. if (!global.cy) {
  3. const chai = require('chai')
  4. const sinon = require('sinon')
  5. const sinonChai = require('sinon-chai')
  6. chai.use(sinonChai)
  7. global.expect = chai.expect
  8. let sandbox
  9. beforeEach(() => {
  10. sandbox = sinon.createSandbox()
  11. global.cy = {
  12. stub: function () {
  13. return sandbox.stub.apply(sandbox, arguments)
  14. },
  15. log () {
  16. console.log.apply(console, arguments)
  17. }
  18. }
  19. })
  20. afterEach(() => {
  21. sandbox.restore()
  22. })
  23. }
  24. const getUserAgent = require('..')
  25. describe('smoke', () => {
  26. it('works', () => {
  27. expect(getUserAgent()).to.be.a('string')
  28. expect(getUserAgent().length).to.be.above(10)
  29. })
  30. })