Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
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.

mount.js 750B

123456789101112131415161718192021222324252627282930
  1. var request = require('supertest');
  2. var path = require('path');
  3. var liveServer = require('..').start({
  4. root: path.join(__dirname, "data"),
  5. port: 0,
  6. open: false,
  7. mount: [
  8. [ "/mounted", path.join(__dirname, "data", "sub") ],
  9. [ "/style", path.join(__dirname, "data", "style.css") ]
  10. ]
  11. });
  12. describe('mount tests', function() {
  13. it('should respond with sub.html', function(done) {
  14. request(liveServer)
  15. .get('/mounted/sub.html')
  16. .expect('Content-Type', 'text/html; charset=UTF-8')
  17. .expect(/Subdirectory/i)
  18. .expect(200, done);
  19. });
  20. it('should respond with style.css', function(done) {
  21. request(liveServer)
  22. .get('/style')
  23. .expect('Content-Type', 'text/css; charset=UTF-8')
  24. .expect(/color/i)
  25. .expect(200, done);
  26. });
  27. });