Fix various typos (#1373)
This commit is contained in:
parent
a2655a4001
commit
acd5185984
lexicons/com/atproto/moderation
packages
bsky/tests
pds/tests
xrpc-server/src
xrpc/src
@ -27,7 +27,7 @@
|
||||
},
|
||||
"reasonSexual": {
|
||||
"type": "token",
|
||||
"description": "Unwanted or mis-labeled sexual content"
|
||||
"description": "Unwanted or mislabeled sexual content"
|
||||
},
|
||||
"reasonRude": {
|
||||
"type": "token",
|
||||
|
@ -126,7 +126,7 @@ describe('db', () => {
|
||||
expect(res.length).toBe(0)
|
||||
})
|
||||
|
||||
it('ensures all inflight querys are rolled back', async () => {
|
||||
it('ensures all inflight queries are rolled back', async () => {
|
||||
let promise: Promise<unknown> | undefined = undefined
|
||||
const names: string[] = []
|
||||
try {
|
||||
|
@ -6,8 +6,8 @@ describe('labeling', () => {
|
||||
const exampleRespBytes = await fs.readFile(
|
||||
'tests/labeler/fixtures/hiveai_resp_example.json',
|
||||
)
|
||||
const exmapleResp = JSON.parse(exampleRespBytes.toString())
|
||||
const classes = hive.respToClasses(exmapleResp)
|
||||
const exampleResp = JSON.parse(exampleRespBytes.toString())
|
||||
const classes = hive.respToClasses(exampleResp)
|
||||
expect(classes.length).toBeGreaterThan(10)
|
||||
|
||||
const labels = hive.summarizeLabels(classes)
|
||||
|
@ -76,11 +76,11 @@ describe('pds posts views', () => {
|
||||
const posts = await agent.api.app.bsky.feed.getPosts({ uris })
|
||||
|
||||
expect(posts.data.posts.length).toBe(2)
|
||||
const recivedUris = posts.data.posts.map((p) => p.uri).sort()
|
||||
const receivedUris = posts.data.posts.map((p) => p.uri).sort()
|
||||
const expected = [
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.bob][0].ref.uriStr,
|
||||
].sort()
|
||||
expect(recivedUris).toEqual(expected)
|
||||
expect(receivedUris).toEqual(expected)
|
||||
})
|
||||
})
|
||||
|
@ -631,13 +631,13 @@ describe('crud operations', () => {
|
||||
record: postRecord(),
|
||||
})
|
||||
const uri = new AtUri(post.uri)
|
||||
const attempDelete = repo.deleteRecord({
|
||||
const attemptDelete = repo.deleteRecord({
|
||||
repo: uri.host,
|
||||
collection: uri.collection,
|
||||
rkey: uri.rkey,
|
||||
swapCommit: staleHead.root,
|
||||
})
|
||||
await expect(attempDelete).rejects.toThrow(deleteRecord.InvalidSwapError)
|
||||
await expect(attemptDelete).rejects.toThrow(deleteRecord.InvalidSwapError)
|
||||
const checkPost = repo.getRecord({
|
||||
repo: uri.host,
|
||||
collection: uri.collection,
|
||||
@ -676,13 +676,13 @@ describe('crud operations', () => {
|
||||
record: postRecord(),
|
||||
})
|
||||
const uri = new AtUri(post.uri)
|
||||
const attempDelete = repo.deleteRecord({
|
||||
const attemptDelete = repo.deleteRecord({
|
||||
repo: uri.host,
|
||||
collection: uri.collection,
|
||||
rkey: uri.rkey,
|
||||
swapRecord: (await cidForCbor({})).toString(),
|
||||
})
|
||||
await expect(attempDelete).rejects.toThrow(deleteRecord.InvalidSwapError)
|
||||
await expect(attemptDelete).rejects.toThrow(deleteRecord.InvalidSwapError)
|
||||
const checkPost = repo.getRecord({
|
||||
repo: uri.host,
|
||||
collection: uri.collection,
|
||||
|
@ -130,7 +130,7 @@ describe('db', () => {
|
||||
expect(res.length).toBe(0)
|
||||
})
|
||||
|
||||
it('ensures all inflight querys are rolled back', async () => {
|
||||
it('ensures all inflight queries are rolled back', async () => {
|
||||
let promise: Promise<unknown> | undefined = undefined
|
||||
const names: string[] = []
|
||||
try {
|
||||
|
@ -150,7 +150,7 @@ describe('account', () => {
|
||||
expect(res3.data.codes.length).toBe(2)
|
||||
})
|
||||
|
||||
it('admin gifted codes to not impact a users avilable codes', async () => {
|
||||
it('admin gifted codes to not impact a users available codes', async () => {
|
||||
const account = await makeLoggedInAccount(agent)
|
||||
|
||||
// again, pretend account was made 2 days ago
|
||||
|
@ -6,8 +6,8 @@ describe('labeling', () => {
|
||||
const exampleRespBytes = await fs.readFile(
|
||||
'tests/labeler/fixtures/hiveai_resp_example.json',
|
||||
)
|
||||
const exmapleResp = JSON.parse(exampleRespBytes.toString())
|
||||
const classes = hive.respToClasses(exmapleResp)
|
||||
const exampleResp = JSON.parse(exampleRespBytes.toString())
|
||||
const classes = hive.respToClasses(exampleResp)
|
||||
expect(classes.length).toBeGreaterThan(10)
|
||||
|
||||
const labels = hive.summarizeLabels(classes)
|
||||
|
@ -55,11 +55,11 @@ describe('pds posts views', () => {
|
||||
)
|
||||
|
||||
expect(posts.data.posts.length).toBe(2)
|
||||
const recivedUris = posts.data.posts.map((p) => p.uri).sort()
|
||||
const receivedUris = posts.data.posts.map((p) => p.uri).sort()
|
||||
const expected = [
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.bob][0].ref.uriStr,
|
||||
].sort()
|
||||
expect(recivedUris).toEqual(expected)
|
||||
expect(receivedUris).toEqual(expected)
|
||||
})
|
||||
})
|
||||
|
@ -166,9 +166,9 @@ export class UpstreamFailureError extends XRPCError {
|
||||
}
|
||||
}
|
||||
|
||||
export class NotEnoughResoucesError extends XRPCError {
|
||||
export class NotEnoughResourcesError extends XRPCError {
|
||||
constructor(errorMessage?: string, customErrorName?: string) {
|
||||
super(ResponseType.NotEnoughResouces, errorMessage, customErrorName)
|
||||
super(ResponseType.NotEnoughResources, errorMessage, customErrorName)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ export enum ResponseType {
|
||||
InternalServerError = 500,
|
||||
MethodNotImplemented = 501,
|
||||
UpstreamFailure = 502,
|
||||
NotEnoughResouces = 503,
|
||||
NotEnoughResources = 503,
|
||||
UpstreamTimeout = 504,
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ export const ResponseTypeNames = {
|
||||
[ResponseType.InternalServerError]: 'InternalServerError',
|
||||
[ResponseType.MethodNotImplemented]: 'MethodNotImplemented',
|
||||
[ResponseType.UpstreamFailure]: 'UpstreamFailure',
|
||||
[ResponseType.NotEnoughResouces]: 'NotEnoughResouces',
|
||||
[ResponseType.NotEnoughResources]: 'NotEnoughResources',
|
||||
[ResponseType.UpstreamTimeout]: 'UpstreamTimeout',
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ export const ResponseTypeStrings = {
|
||||
[ResponseType.InternalServerError]: 'Internal Server Error',
|
||||
[ResponseType.MethodNotImplemented]: 'Method Not Implemented',
|
||||
[ResponseType.UpstreamFailure]: 'Upstream Failure',
|
||||
[ResponseType.NotEnoughResouces]: 'Not Enough Resouces',
|
||||
[ResponseType.NotEnoughResources]: 'Not Enough Resources',
|
||||
[ResponseType.UpstreamTimeout]: 'Upstream Timeout',
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user