Migrate from CommonJS to ESM (#6651)
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
'use strict'
|
||||
|
||||
const Joi = require('joi')
|
||||
const { nonNegativeInteger } = require('../validators')
|
||||
const { metric } = require('../text-formatters')
|
||||
const { BaseJsonService } = require('..')
|
||||
import Joi from 'joi'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { metric } from '../text-formatters.js'
|
||||
import { BaseJsonService } from '../index.js'
|
||||
|
||||
const schema = Joi.object({ activity_total: nonNegativeInteger })
|
||||
|
||||
module.exports = class Bountysource extends BaseJsonService {
|
||||
export default class Bountysource extends BaseJsonService {
|
||||
static category = 'funding'
|
||||
static route = { base: 'bountysource/team', pattern: ':team/activity' }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
'use strict'
|
||||
import { isMetric } from '../test-validators.js'
|
||||
import { ServiceTester } from '../tester.js'
|
||||
|
||||
const { isMetric } = require('../test-validators')
|
||||
const { ServiceTester } = require('../tester')
|
||||
|
||||
const t = (module.exports = new ServiceTester({
|
||||
export const t = new ServiceTester({
|
||||
id: 'bountysource',
|
||||
title: 'Bountysource',
|
||||
}))
|
||||
})
|
||||
|
||||
t.create('bounties (valid)')
|
||||
.get('/team/mozilla-core/activity.json')
|
||||
|
||||
Reference in New Issue
Block a user