UNPKG

robots-txt-parser

Version:

A lightweight robots.txt parser for Node.js with support for wildcards, caching and promises.

14 lines (11 loc) 461 B
const chai = require('chai'); const exampleShort = require('../test-data/example-robots-txt-short.js'); const parse = require('../../src/parser.js'); const { expect } = chai; describe('correct-parse-formatting.', () => { const parseResult = parse(exampleShort); it('Should have one user agent, * and a sitemaps list.', () => { expect(parseResult).to.contain.all.keys(['*', 'sitemaps']); expect(parseResult.sitemaps).to.have.lengthOf(5); }); });