0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/functional/readme/readme.spec.js
2018-01-07 07:59:36 +00:00

39 lines
902 B
JavaScript

import assert from 'assert';
export default function (server, server2) {
describe('should test readme', () => {
beforeAll(function() {
return server.request({
uri: '/readme-test',
headers: {
'content-type': 'application/json',
},
method: 'PUT',
json: require('./pkg-readme.json'),
}).status(201);
});
test('add pkg', () => {});
describe('should check readme file', () => {
const matchReadme = (server) => {
return server.request({
uri: '/-/verdaccio/package/readme/readme-test'
}).status(200).then(function(body) {
assert.equal(body, '<p>this is a readme</p>\n');
});
};
test('server1 - readme', () => {
return matchReadme(server);
});
test('server2 - readme', () => {
return matchReadme(server2);
});
});
});
}