routes-loader-spec.js 606 B

123456789101112131415161718192021
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. * Copyright (c) Konstantin Tarkus (@koistya) | MIT license
  5. */
  6. import { describe, it } from 'mocha';
  7. import { expect } from 'chai';
  8. describe('routes-loader', () => {
  9. it('Should load a list of routes', function test(done) {
  10. this.cacheable = () => {};
  11. this.async = () => (err, result) => {
  12. expect(err).to.be.null;
  13. expect(result).to.not.to.be.empty.and.have.all.keys('/', '/404', '/500');
  14. done();
  15. };
  16. require('../tools/lib/routes-loader').call(this, 'const routes = {};');
  17. });
  18. });