summaryrefslogtreecommitdiffstats
path: root/js/dav/test/unit/data/index.js
blob: 627a39b65a93f4a27aae3833ce6997c7b03a637d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import fs from 'fs';
import { format } from 'util';

import camelize from '../../../lib/camelize';

let docs = {};
export default docs;

[
  'address_book_query',
  'current_user_principal',
  'calendar_query',
  'propfind',
  'sync_collection'
].forEach(function(responseType) {
  var camelCase = camelize(responseType);
  docs[camelCase] = fs
    .readFileSync(
      format('%s/%s.xml', __dirname, responseType),
      'utf-8'
    )
    .replace(/>\s+</g, '><');  // Remove whitespace between close and open tag.
});