mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
Resolve linter issues
This commit is contained in:
@@ -12,7 +12,9 @@ describe('graph.loaders.Actions', () => {
|
||||
{ item_id: 'comment_1' },
|
||||
{ item_id: 'comment_2' },
|
||||
]);
|
||||
const { Actions: { getAuthoredByID } } = loaders({
|
||||
const {
|
||||
Actions: { getAuthoredByID },
|
||||
} = loaders({
|
||||
user: { id: 'user_1' },
|
||||
connectors: { services: { Actions: { getUserActions: spy } } },
|
||||
});
|
||||
@@ -34,7 +36,9 @@ describe('graph.loaders.Actions', () => {
|
||||
describe('#getSummariesByItem', () => {
|
||||
describe('logged out user', () => {
|
||||
it('does not include any user data', async () => {
|
||||
const { Actions: { getSummariesByItem } } = loaders({
|
||||
const {
|
||||
Actions: { getSummariesByItem },
|
||||
} = loaders({
|
||||
loaders: {
|
||||
Actions: {
|
||||
getAuthoredByID: {
|
||||
@@ -72,7 +76,9 @@ describe('graph.loaders.Actions', () => {
|
||||
|
||||
describe('logged in user', () => {
|
||||
it('does include user', async () => {
|
||||
const { Actions: { getSummariesByItem } } = loaders({
|
||||
const {
|
||||
Actions: { getSummariesByItem },
|
||||
} = loaders({
|
||||
loaders: {
|
||||
Actions: {
|
||||
getAuthoredByID: {
|
||||
|
||||
@@ -195,8 +195,7 @@ describe('graph.mutations.createComment', () => {
|
||||
AssetModel.create({
|
||||
id: '123',
|
||||
settings: { disableCommenting: disabled },
|
||||
})
|
||||
);
|
||||
}));
|
||||
|
||||
it(
|
||||
error ? 'does not create the comment' : 'creates the comment',
|
||||
@@ -234,8 +233,7 @@ describe('graph.mutations.createComment', () => {
|
||||
].forEach(({ moderation, status }) => {
|
||||
describe(`moderation=${moderation}`, () => {
|
||||
beforeEach(() =>
|
||||
AssetModel.create({ id: '123', settings: { moderation } })
|
||||
);
|
||||
AssetModel.create({ id: '123', settings: { moderation } }));
|
||||
|
||||
it(`creates comment with status=${status}`, () => {
|
||||
const context = new Context({ user: new UserModel() });
|
||||
@@ -263,8 +261,7 @@ describe('graph.mutations.createComment', () => {
|
||||
SettingsService.update({
|
||||
wordlist: { banned: ['WORST'], suspect: ['EH'] },
|
||||
}),
|
||||
])
|
||||
);
|
||||
]));
|
||||
|
||||
[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user